mips: switch to saner kernel_execve() semantics
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 11 Oct 2012 20:01:20 +0000 (16:01 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 15 Oct 2012 20:27:52 +0000 (16:27 -0400)
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/mips/Kconfig
arch/mips/include/asm/unistd.h
arch/mips/kernel/entry.S

index ede301f9c88b0fbb8c387b0ecf42fb5899b03a63..4183e62f178cd9d85027c32e95392f2f51f409ad 100644 (file)
@@ -41,6 +41,7 @@ config MIPS
        select MODULES_USE_ELF_REL
        select MODULES_USE_ELF_RELA if 64BIT
        select GENERIC_KERNEL_THREAD
+       select GENERIC_KERNEL_EXECVE
 
 menu "Machine selection"
 
index 8ae908c66e599e24b84bcd01f5e46bd0bd86aa9f..b306e2081cad9a4c03a66d9c82595e96581140da 100644 (file)
@@ -18,7 +18,6 @@
 #ifndef __ASSEMBLY__
 
 #define __ARCH_OMIT_COMPAT_SYS_GETDENTS64
-#define __ARCH_WANT_KERNEL_EXECVE
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_SYS_ALARM
 #define __ARCH_WANT_SYS_EXECVE
index 5dcb5fbbbd53c4916f92a779b363898bc62dabb0..3320cb4ac1d485b1ab42bc3da9e6346a0f62b9ff 100644 (file)
@@ -69,8 +69,7 @@ FEXPORT(ret_from_kernel_thread)
        jal     schedule_tail           # a0 = struct task_struct *prev
        move    a0, s1
        jal     s0
-       li      a0, 0
-       j       sys_exit
+       j       syscall_exit
 
 FEXPORT(ret_from_fork)
        jal     schedule_tail           # a0 = struct task_struct *prev
@@ -192,15 +191,6 @@ syscall_exit_work:
        jal     syscall_trace_leave
        b       resume_userspace
 
-LEAF(ret_from_kernel_execve)
-       move    sp, a0
-       ori     $28,  sp, _THREAD_SIZE - 1
-       xori    $28, $28, _THREAD_SIZE - 1
-       li      v0, 0
-       li      a3, 0
-       j       syscall_exit_partial
-       END(ret_from_kernel_execve)
-
 #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_MIPS_MT)
 
 /*