diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-11 17:22:16 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-21 22:38:16 -0400 |
commit | 363806ddd232b67fdb2bd7ec8c98527e481c25c4 (patch) | |
tree | 072ba502e997deca3a31834a21143d11956c616b /arch/parisc | |
parent | ff0ab8af9c3f36e7b6f716c3b9e8811a4202eec6 (diff) |
parisc: switch to saner kernel_execve() semantics
ACKed-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/Kconfig | 1 | ||||
-rw-r--r-- | arch/parisc/include/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/parisc/kernel/entry.S | 22 |
3 files changed, 4 insertions, 20 deletions
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index c779da7cd96b..0aec70c35614 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -23,6 +23,7 @@ config PARISC | |||
23 | select HAVE_MOD_ARCH_SPECIFIC | 23 | select HAVE_MOD_ARCH_SPECIFIC |
24 | select MODULES_USE_ELF_RELA | 24 | select MODULES_USE_ELF_RELA |
25 | select GENERIC_KERNEL_THREAD | 25 | select GENERIC_KERNEL_THREAD |
26 | select GENERIC_KERNEL_EXECVE | ||
26 | 27 | ||
27 | help | 28 | help |
28 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 29 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
diff --git a/arch/parisc/include/asm/unistd.h b/arch/parisc/include/asm/unistd.h index b9e39f335909..4dab76b70ec9 100644 --- a/arch/parisc/include/asm/unistd.h +++ b/arch/parisc/include/asm/unistd.h | |||
@@ -995,7 +995,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ | |||
995 | #define __ARCH_WANT_SYS_RT_SIGACTION | 995 | #define __ARCH_WANT_SYS_RT_SIGACTION |
996 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 996 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
997 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 997 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
998 | #define __ARCH_WANT_KERNEL_EXECVE | ||
999 | #define __ARCH_WANT_SYS_EXECVE | 998 | #define __ARCH_WANT_SYS_EXECVE |
1000 | 999 | ||
1001 | #endif /* __ASSEMBLY__ */ | 1000 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 47fb6ddcf12e..c9a9abd4bc58 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -727,26 +727,10 @@ ENTRY(ret_from_kernel_thread) | |||
727 | LDREG TASK_PT_GR26(%r1), %r1 | 727 | LDREG TASK_PT_GR26(%r1), %r1 |
728 | ble 0(%sr7, %r1) | 728 | ble 0(%sr7, %r1) |
729 | copy %r31, %r2 | 729 | copy %r31, %r2 |
730 | 730 | b finish_child_return | |
731 | #ifdef CONFIG_64BIT | 731 | nop |
732 | ldo -16(%r30),%r29 /* Reference param save area */ | ||
733 | loadgp /* Thread could have been in a module */ | ||
734 | #endif | ||
735 | #ifndef CONFIG_64BIT | ||
736 | b sys_exit | ||
737 | #else | ||
738 | load32 sys_exit, %r1 | ||
739 | bv %r0(%r1) | ||
740 | #endif | ||
741 | ldi 0, %r26 | ||
742 | ENDPROC(ret_from_kernel_thread) | 732 | ENDPROC(ret_from_kernel_thread) |
743 | 733 | ||
744 | ENTRY(ret_from_kernel_execve) | ||
745 | mfctl %cr30, %r1 | ||
746 | b syscall_exit /* forward */ | ||
747 | ldo THREAD_SZ_ALGN+FRAME_SIZE(%r1), %r30 | ||
748 | ENDPROC(ret_from_kernel_execve) | ||
749 | |||
750 | 734 | ||
751 | /* | 735 | /* |
752 | * struct task_struct *_switch_to(struct task_struct *prev, | 736 | * struct task_struct *_switch_to(struct task_struct *prev, |
@@ -1721,7 +1705,7 @@ ENDPROC(sys_fork_wrapper) | |||
1721 | ENTRY(child_return) | 1705 | ENTRY(child_return) |
1722 | BL schedule_tail, %r2 | 1706 | BL schedule_tail, %r2 |
1723 | nop | 1707 | nop |
1724 | 1708 | finish_child_return: | |
1725 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1 | 1709 | LDREG TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1 |
1726 | ldo TASK_REGS(%r1),%r1 /* get pt regs */ | 1710 | ldo TASK_REGS(%r1),%r1 /* get pt regs */ |
1727 | 1711 | ||