diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-02 15:05:11 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-30 22:53:32 -0400 |
commit | 6783eaa2e1253fbcbe2c2f6bb4c843abf1343caf (patch) | |
tree | 457e7b1d54396ed31ba92b7fe7024723d26ba565 /arch/x86/kernel/entry_32.S | |
parent | 7076aada1040de4ed79a5977dbabdb5e5ea5e249 (diff) |
x86, um/x86: switch to generic sys_execve and kernel_execve
32bit wrapper is lost on that; 64bit one is *not*, since
we need to arrange for full pt_regs on stack when we call
sys_execve() and we need to load callee-saved ones from
there afterwards.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/kernel/entry_32.S')
-rw-r--r-- | arch/x86/kernel/entry_32.S | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index ac1107346fc9..b6bb69239296 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -298,6 +298,13 @@ ENTRY(ret_from_fork) | |||
298 | CFI_ENDPROC | 298 | CFI_ENDPROC |
299 | END(ret_from_fork) | 299 | END(ret_from_fork) |
300 | 300 | ||
301 | ENTRY(ret_from_kernel_execve) | ||
302 | movl %eax, %esp | ||
303 | movl $0,PT_EAX(%esp) | ||
304 | GET_THREAD_INFO(%ebp) | ||
305 | jmp syscall_exit | ||
306 | END(ret_from_kernel_execve) | ||
307 | |||
301 | /* | 308 | /* |
302 | * Interrupt exit functions should be protected against kprobes | 309 | * Interrupt exit functions should be protected against kprobes |
303 | */ | 310 | */ |
@@ -322,8 +329,7 @@ ret_from_intr: | |||
322 | andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax | 329 | andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax |
323 | #else | 330 | #else |
324 | /* | 331 | /* |
325 | * We can be coming here from a syscall done in the kernel space, | 332 | * We can be coming here from child spawned by kernel_thread(). |
326 | * e.g. a failed kernel_execve(). | ||
327 | */ | 333 | */ |
328 | movl PT_CS(%esp), %eax | 334 | movl PT_CS(%esp), %eax |
329 | andl $SEGMENT_RPL_MASK, %eax | 335 | andl $SEGMENT_RPL_MASK, %eax |
@@ -727,7 +733,6 @@ ENDPROC(ptregs_##name) | |||
727 | PTREGSCALL1(iopl) | 733 | PTREGSCALL1(iopl) |
728 | PTREGSCALL0(fork) | 734 | PTREGSCALL0(fork) |
729 | PTREGSCALL0(vfork) | 735 | PTREGSCALL0(vfork) |
730 | PTREGSCALL3(execve) | ||
731 | PTREGSCALL2(sigaltstack) | 736 | PTREGSCALL2(sigaltstack) |
732 | PTREGSCALL0(sigreturn) | 737 | PTREGSCALL0(sigreturn) |
733 | PTREGSCALL0(rt_sigreturn) | 738 | PTREGSCALL0(rt_sigreturn) |