lkml.org 
[lkml]   [2006]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] introduce kernel_execve function to replace __KERNEL_SYSCALLS__
Date
On Sunday 20 August 2006 19:36, Chase Venters wrote:

> Unless there's some TLS kernel magic that I've totally missed, using errno in
> this manner is totally unsafe anyway. So I would NAK the above because your
> kernel_execve() function gives an unsafe errno value significance it should
> not have by turning it into a return value.

It has always resulted in an unsafe errno value, my patch just fixes it on
a few architectures and makes it safe there. Note that never even noticed
execve returning -1 on some architectures and -errno on others, and if
execve succeeds, errno is never assigned anyway.

> (As an aside, shouldn't that have read [ ret = -errno; ] anyway?)

Right, thanks for pointing this out.

> Unless 'errno' has some significant reason to live on in the kernel, I think
> it would be better to kill it and write kernel syscall macros that don't muck
> with it.

The direction in which this patch goes is to kill off kernel syscalls
entirely. The main problem there is that kernel_execve needs an architecture
specific implementation (calling sys_execve does the wrong thing), so doing
it all in one step would require knowing how to do it on all 20 architectures.
Once the execve kernel syscall is gone, errno can die with it.

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-20 21:35    [W:0.145 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site