arm: get rid of execve wrapper, switch to generic execve() implementation
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 2 Aug 2012 07:52:41 +0000 (11:52 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 1 Oct 2012 02:21:37 +0000 (22:21 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/arm/include/asm/unistd.h
arch/arm/kernel/calls.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/sys_arm.c

index 2c9b7a8..6a70aa4 100644 (file)
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_SYS_SOCKETCALL
 #endif
+#define __ARCH_WANT_SYS_EXECVE
 #define __ARCH_WANT_KERNEL_EXECVE
 
 /*
index 463ff4a..b287b35 100644 (file)
@@ -20,7 +20,7 @@
                CALL(sys_creat)
                CALL(sys_link)
 /* 10 */       CALL(sys_unlink)
-               CALL(sys_execve_wrapper)
+               CALL(sys_execve)
                CALL(sys_chdir)
                CALL(OBSOLETE(sys_time))        /* used by libc4 */
                CALL(sys_mknod)
index 4a6e46a..ed79412 100644 (file)
@@ -532,11 +532,6 @@ sys_vfork_wrapper:
                b       sys_vfork
 ENDPROC(sys_vfork_wrapper)
 
-sys_execve_wrapper:
-               add     r3, sp, #S_OFF
-               b       sys_execve
-ENDPROC(sys_execve_wrapper)
-
 sys_clone_wrapper:
                add     ip, sp, #S_OFF
                str     ip, [sp, #4]
index c8e729e..c2a898a 100644 (file)
@@ -59,26 +59,6 @@ asmlinkage int sys_vfork(struct pt_regs *regs)
        return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->ARM_sp, regs, 0, NULL, NULL);
 }
 
-/* sys_execve() executes a new program.
- * This is called indirectly via a small wrapper
- */
-asmlinkage int sys_execve(const char __user *filenamei,
-                         const char __user *const __user *argv,
-                         const char __user *const __user *envp, struct pt_regs *regs)
-{
-       int error;
-       char * filename;
-
-       filename = getname(filenamei);
-       error = PTR_ERR(filename);
-       if (IS_ERR(filename))
-               goto out;
-       error = do_execve(filename, argv, envp, regs);
-       putname(filename);
-out:
-       return error;
-}
-
 /*
  * Since loff_t is a 64 bit type we avoid a lot of ABI hassle
  * with a different argument ordering.