summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-20 21:49:33 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-28 21:53:37 -0500
commitda3d4c5fa56236dd924d77ffc4f982356816b93b (patch)
tree37cbc90820ef0e5474801db00c968e2da7c455aa
parentd03d26e58fde2ec99478e26aab47b55755189b08 (diff)
downloadop-kernel-dev-da3d4c5fa56236dd924d77ffc4f982356816b93b.zip
op-kernel-dev-da3d4c5fa56236dd924d77ffc4f982356816b93b.tar.gz
get rid of pt_regs argument of do_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/exec.c16
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/syscalls.h3
3 files changed, 8 insertions, 13 deletions
diff --git a/fs/exec.c b/fs/exec.c
index f86b6cc..5797ed0 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1566,12 +1566,11 @@ out_ret:
int do_execve(const char *filename,
const char __user *const __user *__argv,
- const char __user *const __user *__envp,
- struct pt_regs *regs)
+ const char __user *const __user *__envp)
{
struct user_arg_ptr argv = { .ptr.native = __argv };
struct user_arg_ptr envp = { .ptr.native = __envp };
- return do_execve_common(filename, argv, envp, regs);
+ return do_execve_common(filename, argv, envp, current_pt_regs());
}
#ifdef CONFIG_COMPAT
@@ -1668,7 +1667,7 @@ SYSCALL_DEFINE3(execve,
struct filename *path = getname(filename);
int error = PTR_ERR(path);
if (!IS_ERR(path)) {
- error = do_execve(path->name, argv, envp, current_pt_regs());
+ error = do_execve(path->name, argv, envp);
putname(path);
}
return error;
@@ -1694,12 +1693,9 @@ int kernel_execve(const char *filename,
const char *const argv[],
const char *const envp[])
{
- struct pt_regs *p = current_pt_regs();
- int ret;
-
- ret = do_execve(filename,
+ int ret = do_execve(filename,
(const char __user *const __user *)argv,
- (const char __user *const __user *)envp, p);
+ (const char __user *const __user *)envp);
if (ret < 0)
return ret;
@@ -1707,6 +1703,6 @@ int kernel_execve(const char *filename,
* We were successful. We won't be returning to our caller, but
* instead to user space by manipulating the kernel stack.
*/
- ret_from_kernel_execve(p);
+ ret_from_kernel_execve(current_pt_regs());
}
#endif
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a016648..c572497 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2288,7 +2288,7 @@ extern int disallow_signal(int);
extern int do_execve(const char *,
const char __user * const __user *,
- const char __user * const __user *, struct pt_regs *);
+ const char __user * const __user *);
extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *);
struct task_struct *fork_idle(int);
#ifdef CONFIG_GENERIC_KERNEL_THREAD
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 2779009..526deb3 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -833,8 +833,7 @@ int kernel_execve(const char *filename, const char *const argv[], const char *co
#define kernel_execve(filename, argv, envp) \
do_execve(filename, \
(const char __user *const __user *)argv, \
- (const char __user *const __user *)envp, \
- current_pt_regs())
+ (const char __user *const __user *)envp)
#endif
asmlinkage long sys_execve(const char __user *filename,
OpenPOWER on IntegriCloud