diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-10 03:02:25 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-10 03:02:25 (GMT) |
commit | 42859eea96ba6beabfb0369a1eeffa3c7d2bd9cb (patch) | |
tree | fa38aeda0d6e7a4c48a882b166b8643594a1ad50 /arch/um/kernel/exec.c | |
parent | f59b51fe3d3092c08d7d554ecb40db24011b2ebc (diff) | |
parent | f322220d6159455da2b5a8a596d802c8695fed30 (diff) | |
download | linux-fsl-qoriq-42859eea96ba6beabfb0369a1eeffa3c7d2bd9cb.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull generic execve() changes from Al Viro:
"This introduces the generic kernel_thread() and kernel_execve()
functions, and switches x86, arm, alpha, um and s390 over to them."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (26 commits)
s390: convert to generic kernel_execve()
s390: switch to generic kernel_thread()
s390: fold kernel_thread_helper() into ret_from_fork()
s390: fold execve_tail() into start_thread(), convert to generic sys_execve()
um: switch to generic kernel_thread()
x86, um/x86: switch to generic sys_execve and kernel_execve
x86: split ret_from_fork
alpha: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
alpha: switch to generic kernel_thread()
alpha: switch to generic sys_execve()
arm: get rid of execve wrapper, switch to generic execve() implementation
arm: optimized current_pt_regs()
arm: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
arm: split ret_from_fork, simplify kernel_thread() [based on patch by rmk]
generic sys_execve()
generic kernel_execve()
new helper: current_pt_regs()
preparation for generic kernel_thread()
um: kill thread->forking
um: let signal_delivered() do SIGTRAP on singlestepping into handler
...
Diffstat (limited to 'arch/um/kernel/exec.c')
-rw-r--r-- | arch/um/kernel/exec.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c index de66c42..ab019c7 100644 --- a/arch/um/kernel/exec.c +++ b/arch/um/kernel/exec.c @@ -16,7 +16,6 @@ #include <mem_user.h> #include <skas.h> #include <os.h> -#include "internal.h" void flush_thread(void) { @@ -49,27 +48,7 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) } EXPORT_SYMBOL(start_thread); -long um_execve(const char *file, const char __user *const __user *argv, const char __user *const __user *env) +void __noreturn ret_from_kernel_execve(struct pt_regs *unused) { - long err; - - err = do_execve(file, argv, env, ¤t->thread.regs); - if (!err) - UML_LONGJMP(current->thread.exec_buf, 1); - return err; -} - -long sys_execve(const char __user *file, const char __user *const __user *argv, - const char __user *const __user *env) -{ - long error; - char *filename; - - filename = getname(file); - error = PTR_ERR(filename); - if (IS_ERR(filename)) goto out; - error = do_execve(filename, argv, env, ¤t->thread.regs); - putname(filename); - out: - return error; + UML_LONGJMP(current->thread.exec_buf, 1); } |