diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-16 12:06:34 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-01 00:44:44 -0400 |
commit | d878d6dacee2c862f02da20f7fa3e2c0e8820e71 (patch) | |
tree | c594e7cc3d49e2af55f6fe9706a2fc618dc3f150 /arch/m68k/include/asm | |
parent | 533e6903bea0440816a0f517b0845ccea4cc7917 (diff) |
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/m68k/include/asm')
-rw-r--r-- | arch/m68k/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/unistd.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h index 65322b17b6cf..5e08b597f012 100644 --- a/arch/m68k/include/asm/ptrace.h +++ b/arch/m68k/include/asm/ptrace.h | |||
@@ -85,6 +85,8 @@ struct switch_stack { | |||
85 | #define user_mode(regs) (!((regs)->sr & PS_S)) | 85 | #define user_mode(regs) (!((regs)->sr & PS_S)) |
86 | #define instruction_pointer(regs) ((regs)->pc) | 86 | #define instruction_pointer(regs) ((regs)->pc) |
87 | #define profile_pc(regs) instruction_pointer(regs) | 87 | #define profile_pc(regs) instruction_pointer(regs) |
88 | #define current_pt_regs() \ | ||
89 | (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1 | ||
88 | 90 | ||
89 | #define arch_has_single_step() (1) | 91 | #define arch_has_single_step() (1) |
90 | 92 | ||
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 045cfd6a9e31..c702ad716791 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -382,6 +382,8 @@ | |||
382 | #define __ARCH_WANT_SYS_SIGPROCMASK | 382 | #define __ARCH_WANT_SYS_SIGPROCMASK |
383 | #define __ARCH_WANT_SYS_RT_SIGACTION | 383 | #define __ARCH_WANT_SYS_RT_SIGACTION |
384 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 384 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
385 | #define __ARCH_WANT_SYS_EXECVE | ||
386 | #define __ARCH_WANT_KERNEL_EXECVE | ||
385 | 387 | ||
386 | /* | 388 | /* |
387 | * "Conditional" syscalls | 389 | * "Conditional" syscalls |