score: switch to generic sys_execve()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 15 Oct 2012 19:33:32 +0000 (15:33 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 15 Oct 2012 20:12:07 +0000 (16:12 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/score/include/asm/syscalls.h
arch/score/include/asm/unistd.h
arch/score/kernel/entry.S
arch/score/kernel/sys_score.c

index 1dd5e0d6b0c35bd266297426765808ccff101cf5..8d332534342f608f5ae6c037707c73e94b7b8db8 100644 (file)
@@ -2,7 +2,6 @@
 #define _ASM_SCORE_SYSCALLS_H
 
 asmlinkage long score_clone(struct pt_regs *regs);
-asmlinkage long score_execve(struct pt_regs *regs);
 asmlinkage long score_sigaltstack(struct pt_regs *regs);
 asmlinkage long score_rt_sigreturn(struct pt_regs *regs);
 
index a862384e9c16d80defe1b478bb40cd2c1e877f25..b006ca435120500d4ee75c10ef61ca02413e110b 100644 (file)
@@ -4,5 +4,6 @@
 #define __ARCH_WANT_SYSCALL_NO_FLAGS
 #define __ARCH_WANT_SYSCALL_OFF_T
 #define __ARCH_WANT_SYSCALL_DEPRECATED
+#define __ARCH_WANT_SYS_EXECVE
 
 #include <asm-generic/unistd.h>
index 74a5cc7f596e9a242d19dc6f41c3df5602703211..da9901088bbbc907be62d85c367615ec2151462d 100644 (file)
@@ -487,11 +487,6 @@ illegal_syscall:
        sw      r9, [r0, PT_R7]
        j       syscall_return
 
-ENTRY(sys_execve)
-       mv      r4, r0
-       la      r8, score_execve
-       br      r8
-
 ENTRY(sys_clone)
        mv      r4, r0
        la      r8, score_clone
index 5a682fce1fdb97d5c81a95105313d8619c412ff5..c54434c2fd9dfeb8a5578d5c73d0e4987242856c 100644 (file)
@@ -83,27 +83,3 @@ score_vfork(struct pt_regs *regs)
        return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
                        regs->regs[0], regs, 0, NULL, NULL);
 }
-
-/*
- * sys_execve() executes a new program.
- * This is called indirectly via a small wrapper
- */
-asmlinkage long
-score_execve(struct pt_regs *regs)
-{
-       int error;
-       struct filename *filename;
-
-       filename = getname((char __user*)regs->regs[4]);
-       error = PTR_ERR(filename);
-       if (IS_ERR(filename))
-               return error;
-
-       error = do_execve(filename->name,
-                         (const char __user *const __user *)regs->regs[5],
-                         (const char __user *const __user *)regs->regs[6],
-                         regs);
-
-       putname(filename);
-       return error;
-}