[lkml]   [2006]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Return real errno from execve in ____call_usermodehelper
On Saturday 19 August 2006 10:42, Russell King wrote:
> Maybe what we should be thinking of doing is changing execve() calls
> to kernel_execve() which returns the error code.
> This way, architectures are free to implement execve() whatever way
> they wish - and if they're concerned about using errno, that's their
> own implementation specific detail.

Sounds good, it means we could finally kill __KERNEL_SYSCALLS__ along
with lib/errno.c.

I guess a fallback for those that haven't yet done kernel_execve could be

extern int kernel_execve(const char *filename,
char *const argv[], char *const envp[]);
static inline int kernel_execve(const char *filename,
char *const argv[], char *const envp[]);
int errno;
mm_segment_t old_fs = get_fs();
/* the kernel syscall macro modifies errno */
execve(filename, argv, envp);
return errno;

With that in place, we can remove the global errno right away, and the
kernel syscalls for any architecture that implements its own kernel_execve.

Arnd <><
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-08-20 15:07    [W:0.057 / U:18.936 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site