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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]