diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-03 14:56:02 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-14 23:12:33 -0400 |
commit | 1703a219f7f5ab2c39514f9f0763001cdc907d25 (patch) | |
tree | af79698ae74c94418ef31483c6e75d9588a3f757 | |
parent | 69b58a67213506f98835b0ee8cf24324f59a1442 (diff) | |
download | blackbird-obmc-linux-1703a219f7f5ab2c39514f9f0763001cdc907d25.tar.gz blackbird-obmc-linux-1703a219f7f5ab2c39514f9f0763001cdc907d25.zip |
cris: switch to generic kernel_execve/sys_execve
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/cris/Kconfig | 1 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/entry.S | 11 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/process.c | 23 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/entry.S | 13 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/process.c | 22 | ||||
-rw-r--r-- | arch/cris/include/asm/unistd.h | 1 |
6 files changed, 6 insertions, 65 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 3336a7d25341..81b59d18867e 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -50,6 +50,7 @@ config CRIS select GENERIC_CMOS_UPDATE select MODULES_USE_ELF_RELA select GENERIC_KERNEL_THREAD + select GENERIC_KERNEL_EXECVE config HZ int diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index b8e39e00acb2..897bba67bf7a 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S @@ -87,8 +87,8 @@ ret_from_kernel_thread: jsr schedule_tail move.d $r2, $r10 ; argument is here jsr $r1 ; call the payload - moveq 0, $r10 - jsr sys_exit ; never returns + moveq 0, $r9 ; no syscall restarts, TYVM... + ba ret_from_sys_call ret_from_intr: ;; check for resched if preemptive kernel or if we're going back to user-mode @@ -594,13 +594,6 @@ _ugdb_handle_breakpoint: ba do_sigtrap ; SIGTRAP the offending process. pop $dccr ; Restore dccr in delay slot. - .global kernel_execve -kernel_execve: - move.d __NR_execve, $r9 - break 13 - ret - nop - .data hw_bp_trigs: diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index 8a673aa81cdd..1d6458287f38 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c @@ -167,29 +167,6 @@ asmlinkage int sys_vfork(void) return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), current_pt_regs(), 0, NULL, NULL); } -/* - * sys_execve() executes a new program. - */ -asmlinkage int sys_execve(const char *fname, - const char *const *argv, - const char *const *envp, - long r13, long mof, long srp, - struct pt_regs *regs) -{ - int error; - struct filename *filename; - - filename = getname(fname); - error = PTR_ERR(filename); - - if (IS_ERR(filename)) - goto out; - error = do_execve(filename->name, argv, envp, regs); - putname(filename); - out: - return error; -} - unsigned long get_wchan(struct task_struct *p) { #if 0 diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index a9bcbc419278..faa644111feb 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S @@ -92,8 +92,8 @@ ret_from_kernel_thread: move.d $r2, $r10 jsr $r1 nop - moveq 0, $r10 - jsr sys_exit + moveq 0, $r9 ; no syscall restarts, TYVM... + ba ret_from_sys_call nop .size ret_from_kernel_thread, . - ret_from_kernel_thread @@ -544,15 +544,6 @@ _ugdb_handle_exception: ba do_sigtrap ; SIGTRAP the offending process. move.d [$sp+], $r0 ; Restore R0 in delay slot. - .global kernel_execve - .type kernel_execve,@function -kernel_execve: - move.d __NR_execve, $r9 - break 13 - ret - nop - .size kernel_execve, . - kernel_execve - .data .section .rodata,"a" diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 3edbdb88110e..fe465401b6ec 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c @@ -186,28 +186,6 @@ sys_vfork(void) return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), current_pt_regs(), 0, NULL, NULL); } -/* sys_execve() executes a new program. */ -asmlinkage int -sys_execve(const char *fname, - const char *const *argv, - const char *const *envp, long r13, long mof, long srp, - struct pt_regs *regs) -{ - int error; - struct filename *filename; - - filename = getname(fname); - error = PTR_ERR(filename); - - if (IS_ERR(filename)) - goto out; - - error = do_execve(filename->name, argv, envp, regs); - putname(filename); - out: - return error; -} - unsigned long get_wchan(struct task_struct *p) { diff --git a/arch/cris/include/asm/unistd.h b/arch/cris/include/asm/unistd.h index 51873a446f87..f181d1fc7632 100644 --- a/arch/cris/include/asm/unistd.h +++ b/arch/cris/include/asm/unistd.h @@ -371,6 +371,7 @@ #define __ARCH_WANT_SYS_SIGPROCMASK #define __ARCH_WANT_SYS_RT_SIGACTION #define __ARCH_WANT_SYS_RT_SIGSUSPEND +#define __ARCH_WANT_SYS_EXECVE /* * "Conditional" syscalls |