Skip to content

Commit

Permalink
score: switch to generic sys_execve()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Oct 15, 2012
1 parent 1856ab6 commit 1ffbed7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 30 deletions.
1 change: 0 additions & 1 deletion arch/score/include/asm/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions arch/score/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
5 changes: 0 additions & 5 deletions arch/score/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 0 additions & 24 deletions arch/score/kernel/sys_score.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 1ffbed7

Please sign in to comment.