Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

unicore32: switch to generic sys_execve()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-and-Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn>

authored by

Al Viro and committed by
Guan Xuetao
60541d77 38e99353

+1 -26
+1
arch/unicore32/include/uapi/asm/unistd.h
··· 12 12 13 13 /* Use the standard ABI for syscalls. */ 14 14 #include <asm-generic/unistd.h> 15 + #define __ARCH_WANT_SYS_EXECVE
-5
arch/unicore32/kernel/entry.S
··· 668 668 #endif 669 669 .ltorg 670 670 671 - ENTRY(sys_execve) 672 - add r3, sp, #S_OFF 673 - b __sys_execve 674 - ENDPROC(sys_execve) 675 - 676 671 ENTRY(sys_clone) 677 672 add ip, sp, #S_OFF 678 673 stw ip, [sp+], #4
-21
arch/unicore32/kernel/sys.c
··· 42 42 parent_tid, child_tid); 43 43 } 44 44 45 - /* sys_execve() executes a new program. 46 - * This is called indirectly via a small wrapper 47 - */ 48 - asmlinkage long __sys_execve(const char __user *filename, 49 - const char __user *const __user *argv, 50 - const char __user *const __user *envp, 51 - struct pt_regs *regs) 52 - { 53 - int error; 54 - struct filename *fn; 55 - 56 - fn = getname(filename); 57 - error = PTR_ERR(fn); 58 - if (IS_ERR(fn)) 59 - goto out; 60 - error = do_execve(fn->name, argv, envp, regs); 61 - putname(fn); 62 - out: 63 - return error; 64 - } 65 - 66 45 /* Note: used by the compat code even in 64-bit Linux. */ 67 46 SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, 68 47 unsigned long, prot, unsigned long, flags,