diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-15 15:33:32 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-15 16:12:07 -0400 |
commit | 1ffbed7220331dabc04dee6d3c520b5b022b9245 (patch) | |
tree | 2131e1a352fd60a728ee24e2543a0d701cd94264 /arch/score | |
parent | 1856ab6db1296c9c31ad58263d49ee9b75568ddb (diff) |
score: switch to generic sys_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/score')
-rw-r--r-- | arch/score/include/asm/syscalls.h | 1 | ||||
-rw-r--r-- | arch/score/include/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/score/kernel/entry.S | 5 | ||||
-rw-r--r-- | arch/score/kernel/sys_score.c | 24 |
4 files changed, 1 insertions, 30 deletions
diff --git a/arch/score/include/asm/syscalls.h b/arch/score/include/asm/syscalls.h index 1dd5e0d6b0c3..8d332534342f 100644 --- a/arch/score/include/asm/syscalls.h +++ b/arch/score/include/asm/syscalls.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_SCORE_SYSCALLS_H | 2 | #define _ASM_SCORE_SYSCALLS_H |
3 | 3 | ||
4 | asmlinkage long score_clone(struct pt_regs *regs); | 4 | asmlinkage long score_clone(struct pt_regs *regs); |
5 | asmlinkage long score_execve(struct pt_regs *regs); | ||
6 | asmlinkage long score_sigaltstack(struct pt_regs *regs); | 5 | asmlinkage long score_sigaltstack(struct pt_regs *regs); |
7 | asmlinkage long score_rt_sigreturn(struct pt_regs *regs); | 6 | asmlinkage long score_rt_sigreturn(struct pt_regs *regs); |
8 | 7 | ||
diff --git a/arch/score/include/asm/unistd.h b/arch/score/include/asm/unistd.h index a862384e9c16..b006ca435120 100644 --- a/arch/score/include/asm/unistd.h +++ b/arch/score/include/asm/unistd.h | |||
@@ -4,5 +4,6 @@ | |||
4 | #define __ARCH_WANT_SYSCALL_NO_FLAGS | 4 | #define __ARCH_WANT_SYSCALL_NO_FLAGS |
5 | #define __ARCH_WANT_SYSCALL_OFF_T | 5 | #define __ARCH_WANT_SYSCALL_OFF_T |
6 | #define __ARCH_WANT_SYSCALL_DEPRECATED | 6 | #define __ARCH_WANT_SYSCALL_DEPRECATED |
7 | #define __ARCH_WANT_SYS_EXECVE | ||
7 | 8 | ||
8 | #include <asm-generic/unistd.h> | 9 | #include <asm-generic/unistd.h> |
diff --git a/arch/score/kernel/entry.S b/arch/score/kernel/entry.S index 74a5cc7f596e..da9901088bbb 100644 --- a/arch/score/kernel/entry.S +++ b/arch/score/kernel/entry.S | |||
@@ -487,11 +487,6 @@ illegal_syscall: | |||
487 | sw r9, [r0, PT_R7] | 487 | sw r9, [r0, PT_R7] |
488 | j syscall_return | 488 | j syscall_return |
489 | 489 | ||
490 | ENTRY(sys_execve) | ||
491 | mv r4, r0 | ||
492 | la r8, score_execve | ||
493 | br r8 | ||
494 | |||
495 | ENTRY(sys_clone) | 490 | ENTRY(sys_clone) |
496 | mv r4, r0 | 491 | mv r4, r0 |
497 | la r8, score_clone | 492 | la r8, score_clone |
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c index 5a682fce1fdb..c54434c2fd9d 100644 --- a/arch/score/kernel/sys_score.c +++ b/arch/score/kernel/sys_score.c | |||
@@ -83,27 +83,3 @@ score_vfork(struct pt_regs *regs) | |||
83 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, | 83 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, |
84 | regs->regs[0], regs, 0, NULL, NULL); | 84 | regs->regs[0], regs, 0, NULL, NULL); |
85 | } | 85 | } |
86 | |||
87 | /* | ||
88 | * sys_execve() executes a new program. | ||
89 | * This is called indirectly via a small wrapper | ||
90 | */ | ||
91 | asmlinkage long | ||
92 | score_execve(struct pt_regs *regs) | ||
93 | { | ||
94 | int error; | ||
95 | struct filename *filename; | ||
96 | |||
97 | filename = getname((char __user*)regs->regs[4]); | ||
98 | error = PTR_ERR(filename); | ||
99 | if (IS_ERR(filename)) | ||
100 | return error; | ||
101 | |||
102 | error = do_execve(filename->name, | ||
103 | (const char __user *const __user *)regs->regs[5], | ||
104 | (const char __user *const __user *)regs->regs[6], | ||
105 | regs); | ||
106 | |||
107 | putname(filename); | ||
108 | return error; | ||
109 | } | ||