diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2012-10-25 03:10:52 -0400 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2012-10-25 18:00:44 -0400 |
commit | dc241f2c1761bfdec85915f4bbf7e750663f3442 (patch) | |
tree | e118ecb044d1b8a8427892b73ea00e052a504730 /arch/xtensa | |
parent | f0a1bf0859ffa059f9009d6a17e8d46241fb2161 (diff) |
xtensa: switch to generic sys_execve()
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/syscall.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/xtensa/include/uapi/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/process.c | 25 |
4 files changed, 3 insertions, 27 deletions
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h index c1dacca312f3..124aeee0d381 100644 --- a/arch/xtensa/include/asm/syscall.h +++ b/arch/xtensa/include/asm/syscall.h | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | struct pt_regs; | 11 | struct pt_regs; |
12 | struct sigaction; | 12 | struct sigaction; |
13 | asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*); | 13 | asmlinkage long sys_execve(char*, char**, char**, struct pt_regs*); |
14 | asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*); | 14 | asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*); |
15 | asmlinkage long xtensa_ptrace(long, long, long, long); | 15 | asmlinkage long xtensa_ptrace(long, long, long, long); |
16 | asmlinkage long xtensa_sigreturn(struct pt_regs*); | 16 | asmlinkage long xtensa_sigreturn(struct pt_regs*); |
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h index d9fa52dbfba0..f4e6eaa40d1c 100644 --- a/arch/xtensa/include/asm/unistd.h +++ b/arch/xtensa/include/asm/unistd.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _XTENSA_UNISTD_H | 1 | #ifndef _XTENSA_UNISTD_H |
2 | #define _XTENSA_UNISTD_H | 2 | #define _XTENSA_UNISTD_H |
3 | 3 | ||
4 | #define __ARCH_WANT_SYS_EXECVE | ||
4 | #include <uapi/asm/unistd.h> | 5 | #include <uapi/asm/unistd.h> |
5 | 6 | ||
6 | /* | 7 | /* |
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h index 1fd157f31211..9f36d0e3e0ac 100644 --- a/arch/xtensa/include/uapi/asm/unistd.h +++ b/arch/xtensa/include/uapi/asm/unistd.h | |||
@@ -262,7 +262,7 @@ __SYSCALL(115, sys_sendmmsg, 4) | |||
262 | #define __NR_clone 116 | 262 | #define __NR_clone 116 |
263 | __SYSCALL(116, xtensa_clone, 5) | 263 | __SYSCALL(116, xtensa_clone, 5) |
264 | #define __NR_execve 117 | 264 | #define __NR_execve 117 |
265 | __SYSCALL(117, xtensa_execve, 3) | 265 | __SYSCALL(117, sys_execve, 3) |
266 | #define __NR_exit 118 | 266 | #define __NR_exit 118 |
267 | __SYSCALL(118, sys_exit, 1) | 267 | __SYSCALL(118, sys_exit, 1) |
268 | #define __NR_exit_group 119 | 268 | #define __NR_exit_group 119 |
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index be52fe437c1b..09ae7bfab9a7 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c | |||
@@ -373,28 +373,3 @@ long xtensa_clone(unsigned long clone_flags, unsigned long newsp, | |||
373 | { | 373 | { |
374 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); | 374 | return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid); |
375 | } | 375 | } |
376 | |||
377 | /* | ||
378 | * xtensa_execve() executes a new program. | ||
379 | */ | ||
380 | |||
381 | asmlinkage | ||
382 | long xtensa_execve(const char __user *name, | ||
383 | const char __user *const __user *argv, | ||
384 | const char __user *const __user *envp, | ||
385 | long a3, long a4, long a5, | ||
386 | struct pt_regs *regs) | ||
387 | { | ||
388 | long error; | ||
389 | struct filename *filename; | ||
390 | |||
391 | filename = getname(name); | ||
392 | error = PTR_ERR(filename); | ||
393 | if (IS_ERR(filename)) | ||
394 | goto out; | ||
395 | error = do_execve(filename->name, argv, envp, regs); | ||
396 | putname(filename); | ||
397 | out: | ||
398 | return error; | ||
399 | } | ||
400 | |||