diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-02 07:46:39 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-01 02:21:36 (GMT) |
commit | 583d632fb3f6d7e9d133a7260829dd7565f8cc99 (patch) | |
tree | 57760f02b8f9aa876a08e309f0ff258442bfa639 /arch/arm/kernel/entry-common.S | |
parent | 9e14f828ee4a7a4a98703e380d180717a579fb35 (diff) | |
download | linux-583d632fb3f6d7e9d133a7260829dd7565f8cc99.tar.xz |
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 9a48b7a..4a6e46a 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" |