diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2012-09-10 17:11:46 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-10-17 15:35:04 +0200 |
commit | 59dc67b0cc35cd93c3f4869fdd0d6cfb2a26ecbc (patch) | |
tree | fa47b1ad1c6f0688fd50c3bd5f573bb55a451730 /arch/arm64/kernel/sys.c | |
parent | arm64: Use generic kernel_thread() implementation (diff) | |
download | linux-59dc67b0cc35cd93c3f4869fdd0d6cfb2a26ecbc.tar.xz linux-59dc67b0cc35cd93c3f4869fdd0d6cfb2a26ecbc.zip |
arm64: Use generic kernel_execve() implementation
This patch enables CONFIG_GENERIC_KERNEL_EXECVE on arm64 and removes the
arm64-specific implementation of kernel_execve().
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/sys.c')
-rw-r--r-- | arch/arm64/kernel/sys.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c index b120df37de35..4deb0d0093cd 100644 --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c @@ -62,49 +62,6 @@ out: return error; } -int kernel_execve(const char *filename, - const char *const argv[], - const char *const envp[]) -{ - struct pt_regs regs; - int ret; - - memset(®s, 0, sizeof(struct pt_regs)); - ret = do_execve(filename, - (const char __user *const __user *)argv, - (const char __user *const __user *)envp, ®s); - if (ret < 0) - goto out; - - /* - * Save argc to the register structure for userspace. - */ - regs.regs[0] = ret; - - /* - * We were successful. We won't be returning to our caller, but - * instead to user space by manipulating the kernel stack. - */ - asm( "add x0, %0, %1\n\t" - "mov x1, %2\n\t" - "mov x2, %3\n\t" - "bl memmove\n\t" /* copy regs to top of stack */ - "mov x27, #0\n\t" /* not a syscall */ - "mov x28, %0\n\t" /* thread structure */ - "mov sp, x0\n\t" /* reposition stack pointer */ - "b ret_to_user" - : - : "r" (current_thread_info()), - "Ir" (THREAD_START_SP - sizeof(regs)), - "r" (®s), - "Ir" (sizeof(regs)) - : "x0", "x1", "x2", "x27", "x28", "x30", "memory"); - - out: - return ret; -} -EXPORT_SYMBOL(kernel_execve); - asmlinkage long sys_mmap(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, off_t off) |