From d878d6dacee2c862f02da20f7fa3e2c0e8820e71 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 16 Sep 2012 12:06:34 -0400 Subject: m68k: switch to generic sys_execve()/kernel_execve() The tricky part here is that task_pt_regs() on m68k works *only* for process inside do_signal(). However, we need something much simpler - pt_regs of a process inside do_signal() may be at different offsets from the stack bottom, depending on the way we'd entered the kernel, but for a task inside sys_execve() it *is* at constant offset. Moreover, for a kernel thread about to become a userland process the same location is also fine - setting sp to that will leave the kernel stack pointer at the very bottom of the kernel stack when we finally switch to userland. Signed-off-by: Al Viro --- arch/m68k/kernel/entry.S | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/m68k/kernel/entry.S') diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 8a01f580a024..946cb0187751 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S @@ -122,6 +122,11 @@ ENTRY(ret_from_kernel_thread) movel %d0,(%sp) jra sys_exit +ENTRY(ret_from_kernel_execve) + movel 4(%sp), %sp + GET_CURRENT(%d0) + jra ret_from_exception + #if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU) #ifdef TRAP_DBG_INTERRUPT -- cgit