[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200608202131.45946.arnd@arndb.de>
Date: Sun, 20 Aug 2006 21:31:44 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Chase Venters <chase.venters@...entec.com>
Cc: Björn Steinbrink <B.Steinbrink@....de>,
Russell King <rmk+lkml@....linux.org.uk>,
Andrew Morton <akpm@...l.org>, rusty@...tcorp.com.au,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH] introduce kernel_execve function to replace __KERNEL_SYSCALLS__
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists