x86, um/x86: switch to generic sys_execve and kernel_execve
32bit wrapper is lost on that; 64bit one is *not*, since we need to arrange for full pt_regs on stack when we call sys_execve() and we need to load callee-saved ones from there afterwards. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include "asm/mman.h"
|
||||
#include "asm/uaccess.h"
|
||||
#include "asm/unistd.h"
|
||||
#include "internal.h"
|
||||
|
||||
long sys_fork(void)
|
||||
{
|
||||
@@ -50,19 +49,3 @@ long old_mmap(unsigned long addr, unsigned long len,
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
int kernel_execve(const char *filename,
|
||||
const char *const argv[],
|
||||
const char *const envp[])
|
||||
{
|
||||
mm_segment_t fs;
|
||||
int ret;
|
||||
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
ret = um_execve(filename, (const char __user *const __user *)argv,
|
||||
(const char __user *const __user *) envp);
|
||||
set_fs(fs);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user