diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-02 09:46:39 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-01 04:21:36 +0200 |
commit | 583d632fb3f6d7e9d133a7260829dd7565f8cc99 (patch) | |
tree | 57760f02b8f9aa876a08e309f0ff258442bfa639 /arch/arm/kernel/entry-common.S | |
parent | arm: split ret_from_fork, simplify kernel_thread() [based on patch by rmk] (diff) | |
download | linux-583d632fb3f6d7e9d133a7260829dd7565f8cc99.tar.xz linux-583d632fb3f6d7e9d133a7260829dd7565f8cc99.zip |
arm: introduce ret_from_kernel_execve(), switch to generic kernel_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r-- | arch/arm/kernel/entry-common.S | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 9a48b7a577e7..4a6e46a9a3d7 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -103,6 +103,18 @@ ENTRY(ret_from_kernel_thread) UNWIND(.fnend) ENDPROC(ret_from_kernel_thread) +/* + * turn a kernel thread into userland process + * use: ret_from_kernel_execve(struct pt_regs *normal) + */ +ENTRY(ret_from_kernel_execve) + mov why, #0 @ not a syscall + str why, [r0, #S_R0] @ ... and we want 0 in ->ARM_r0 as well + get_thread_info tsk @ thread structure + mov sp, r0 @ stack pointer just under pt_regs + b ret_slow_syscall +ENDPROC(ret_from_kernel_execve) + .equ NR_syscalls,0 #define CALL(x) .equ NR_syscalls,NR_syscalls+1 #include "calls.S" |