diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-13 17:36:40 -0400 |
---|---|---|
committer | Guan Xuetao <gxt@mprc.pku.edu.cn> | 2012-11-09 04:30:10 -0500 |
commit | 60541d778e536455970281de25b2476e01c03aef (patch) | |
tree | a733b1d7e61015d52066a0fd2ea5e2e999948d60 /arch/unicore32 | |
parent | 38e993535edda089a6956bf12a1dde2602649de9 (diff) |
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>
Diffstat (limited to 'arch/unicore32')
-rw-r--r-- | arch/unicore32/include/uapi/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/unicore32/kernel/entry.S | 5 | ||||
-rw-r--r-- | arch/unicore32/kernel/sys.c | 21 |
3 files changed, 1 insertions, 26 deletions
diff --git a/arch/unicore32/include/uapi/asm/unistd.h b/arch/unicore32/include/uapi/asm/unistd.h index 2abcf61c615d..d18a3be89b38 100644 --- a/arch/unicore32/include/uapi/asm/unistd.h +++ b/arch/unicore32/include/uapi/asm/unistd.h | |||
@@ -12,3 +12,4 @@ | |||
12 | 12 | ||
13 | /* Use the standard ABI for syscalls. */ | 13 | /* Use the standard ABI for syscalls. */ |
14 | #include <asm-generic/unistd.h> | 14 | #include <asm-generic/unistd.h> |
15 | #define __ARCH_WANT_SYS_EXECVE | ||
diff --git a/arch/unicore32/kernel/entry.S b/arch/unicore32/kernel/entry.S index 32648c99483a..7049350c790f 100644 --- a/arch/unicore32/kernel/entry.S +++ b/arch/unicore32/kernel/entry.S | |||
@@ -668,11 +668,6 @@ __cr_alignment: | |||
668 | #endif | 668 | #endif |
669 | .ltorg | 669 | .ltorg |
670 | 670 | ||
671 | ENTRY(sys_execve) | ||
672 | add r3, sp, #S_OFF | ||
673 | b __sys_execve | ||
674 | ENDPROC(sys_execve) | ||
675 | |||
676 | ENTRY(sys_clone) | 671 | ENTRY(sys_clone) |
677 | add ip, sp, #S_OFF | 672 | add ip, sp, #S_OFF |
678 | stw ip, [sp+], #4 | 673 | stw ip, [sp+], #4 |
diff --git a/arch/unicore32/kernel/sys.c b/arch/unicore32/kernel/sys.c index 8b6e4cc57393..9680134b31f0 100644 --- a/arch/unicore32/kernel/sys.c +++ b/arch/unicore32/kernel/sys.c | |||
@@ -42,27 +42,6 @@ asmlinkage long __sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
42 | parent_tid, child_tid); | 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 | /* Note: used by the compat code even in 64-bit Linux. */ | 45 | /* Note: used by the compat code even in 64-bit Linux. */ |
67 | SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, | 46 | SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len, |
68 | unsigned long, prot, unsigned long, flags, | 47 | unsigned long, prot, unsigned long, flags, |