Skip to content

Commit

Permalink
xtensa: switch to generic sys_execve()
Browse files Browse the repository at this point in the history
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
  • Loading branch information
Max Filippov authored and Chris Zankel committed Oct 25, 2012
1 parent f0a1bf0 commit dc241f2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

struct pt_regs;
struct sigaction;
asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
asmlinkage long sys_execve(char*, char**, char**, struct pt_regs*);
asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*);
asmlinkage long xtensa_ptrace(long, long, long, long);
asmlinkage long xtensa_sigreturn(struct pt_regs*);
Expand Down
1 change: 1 addition & 0 deletions arch/xtensa/include/asm/unistd.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _XTENSA_UNISTD_H
#define _XTENSA_UNISTD_H

#define __ARCH_WANT_SYS_EXECVE
#include <uapi/asm/unistd.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/uapi/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ __SYSCALL(115, sys_sendmmsg, 4)
#define __NR_clone 116
__SYSCALL(116, xtensa_clone, 5)
#define __NR_execve 117
__SYSCALL(117, xtensa_execve, 3)
__SYSCALL(117, sys_execve, 3)
#define __NR_exit 118
__SYSCALL(118, sys_exit, 1)
#define __NR_exit_group 119
Expand Down
25 changes: 0 additions & 25 deletions arch/xtensa/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,28 +373,3 @@ long xtensa_clone(unsigned long clone_flags, unsigned long newsp,
{
return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
}

/*
* xtensa_execve() executes a new program.
*/

asmlinkage
long xtensa_execve(const char __user *name,
const char __user *const __user *argv,
const char __user *const __user *envp,
long a3, long a4, long a5,
struct pt_regs *regs)
{
long error;
struct filename *filename;

filename = getname(name);
error = PTR_ERR(filename);
if (IS_ERR(filename))
goto out;
error = do_execve(filename->name, argv, envp, regs);
putname(filename);
out:
return error;
}

0 comments on commit dc241f2

Please sign in to comment.