diff options
-rw-r--r-- | arch/Kconfig | 3 | ||||
-rw-r--r-- | arch/um/kernel/signal.c | 5 | ||||
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/syscalls.h | 3 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 1 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 1 | ||||
-rw-r--r-- | arch/x86/kernel/signal.c | 7 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_32.tbl | 2 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_64.tbl | 2 | ||||
-rw-r--r-- | arch/x86/um/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/um/sys_call_table_32.c | 1 | ||||
-rw-r--r-- | arch/x86/um/sys_call_table_64.c | 1 | ||||
-rw-r--r-- | include/linux/syscalls.h | 6 | ||||
-rw-r--r-- | kernel/signal.c | 6 |
14 files changed, 19 insertions, 21 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 0a8dd0585d0d..330176824594 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -335,6 +335,9 @@ config MODULES_USE_ELF_REL | |||
335 | Modules only use ELF REL relocations. Modules with ELF RELA | 335 | Modules only use ELF REL relocations. Modules with ELF RELA |
336 | relocations will give an error. | 336 | relocations will give an error. |
337 | 337 | ||
338 | config GENERIC_SIGALTSTACK | ||
339 | bool | ||
340 | |||
338 | # | 341 | # |
339 | # ABI hall of shame | 342 | # ABI hall of shame |
340 | # | 343 | # |
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index db18eb6124e1..48ccf718e290 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c | |||
@@ -132,8 +132,3 @@ long sys_sigsuspend(int history0, int history1, old_sigset_t mask) | |||
132 | siginitset(&blocked, mask); | 132 | siginitset(&blocked, mask); |
133 | return sigsuspend(&blocked); | 133 | return sigsuspend(&blocked); |
134 | } | 134 | } |
135 | |||
136 | long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) | ||
137 | { | ||
138 | return do_sigaltstack(uss, uoss, PT_REGS_SP(¤t->thread.regs)); | ||
139 | } | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 01ca0ebaff0e..f380614d7d89 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -111,6 +111,7 @@ config X86 | |||
111 | select MODULES_USE_ELF_REL if X86_32 | 111 | select MODULES_USE_ELF_REL if X86_32 |
112 | select MODULES_USE_ELF_RELA if X86_64 | 112 | select MODULES_USE_ELF_RELA if X86_64 |
113 | select CLONE_BACKWARDS if X86_32 | 113 | select CLONE_BACKWARDS if X86_32 |
114 | select GENERIC_SIGALTSTACK | ||
114 | 115 | ||
115 | config INSTRUCTION_DECODER | 116 | config INSTRUCTION_DECODER |
116 | def_bool y | 117 | def_bool y |
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index 2f8374718aa3..58b7e3eac0ae 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
@@ -25,9 +25,6 @@ asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); | |||
25 | 25 | ||
26 | /* kernel/signal.c */ | 26 | /* kernel/signal.c */ |
27 | long sys_rt_sigreturn(struct pt_regs *); | 27 | long sys_rt_sigreturn(struct pt_regs *); |
28 | long sys_sigaltstack(const stack_t __user *, stack_t __user *, | ||
29 | struct pt_regs *); | ||
30 | |||
31 | 28 | ||
32 | /* kernel/tls.c */ | 29 | /* kernel/tls.c */ |
33 | asmlinkage int sys_set_thread_area(struct user_desc __user *); | 30 | asmlinkage int sys_set_thread_area(struct user_desc __user *); |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index c763116c5359..ff84d5469d77 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -739,7 +739,6 @@ ENTRY(ptregs_##name) ; \ | |||
739 | ENDPROC(ptregs_##name) | 739 | ENDPROC(ptregs_##name) |
740 | 740 | ||
741 | PTREGSCALL1(iopl) | 741 | PTREGSCALL1(iopl) |
742 | PTREGSCALL2(sigaltstack) | ||
743 | PTREGSCALL0(sigreturn) | 742 | PTREGSCALL0(sigreturn) |
744 | PTREGSCALL0(rt_sigreturn) | 743 | PTREGSCALL0(rt_sigreturn) |
745 | PTREGSCALL2(vm86) | 744 | PTREGSCALL2(vm86) |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 2363e820ed68..6e462019f195 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -864,7 +864,6 @@ END(stub_\func) | |||
864 | FORK_LIKE clone | 864 | FORK_LIKE clone |
865 | FORK_LIKE fork | 865 | FORK_LIKE fork |
866 | FORK_LIKE vfork | 866 | FORK_LIKE vfork |
867 | PTREGSCALL stub_sigaltstack, sys_sigaltstack, %rdx | ||
868 | PTREGSCALL stub_iopl, sys_iopl, %rsi | 867 | PTREGSCALL stub_iopl, sys_iopl, %rsi |
869 | 868 | ||
870 | ENTRY(ptregscall_common) | 869 | ENTRY(ptregscall_common) |
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 70b27ee6118e..16d065c23baf 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -602,13 +602,6 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
602 | } | 602 | } |
603 | #endif /* CONFIG_X86_32 */ | 603 | #endif /* CONFIG_X86_32 */ |
604 | 604 | ||
605 | long | ||
606 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | ||
607 | struct pt_regs *regs) | ||
608 | { | ||
609 | return do_sigaltstack(uss, uoss, regs->sp); | ||
610 | } | ||
611 | |||
612 | /* | 605 | /* |
613 | * Do a signal return; undo the signal stack. | 606 | * Do a signal return; undo the signal stack. |
614 | */ | 607 | */ |
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index ee3c220ee500..62c7b222e45c 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl | |||
@@ -192,7 +192,7 @@ | |||
192 | 183 i386 getcwd sys_getcwd | 192 | 183 i386 getcwd sys_getcwd |
193 | 184 i386 capget sys_capget | 193 | 184 i386 capget sys_capget |
194 | 185 i386 capset sys_capset | 194 | 185 i386 capset sys_capset |
195 | 186 i386 sigaltstack ptregs_sigaltstack stub32_sigaltstack | 195 | 186 i386 sigaltstack sys_sigaltstack stub32_sigaltstack |
196 | 187 i386 sendfile sys_sendfile sys32_sendfile | 196 | 187 i386 sendfile sys_sendfile sys32_sendfile |
197 | 188 i386 getpmsg | 197 | 188 i386 getpmsg |
198 | 189 i386 putpmsg | 198 | 189 i386 putpmsg |
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl index a582bfed95bb..6ffa7f9d005e 100644 --- a/arch/x86/syscalls/syscall_64.tbl +++ b/arch/x86/syscalls/syscall_64.tbl | |||
@@ -137,7 +137,7 @@ | |||
137 | 128 64 rt_sigtimedwait sys_rt_sigtimedwait | 137 | 128 64 rt_sigtimedwait sys_rt_sigtimedwait |
138 | 129 64 rt_sigqueueinfo sys_rt_sigqueueinfo | 138 | 129 64 rt_sigqueueinfo sys_rt_sigqueueinfo |
139 | 130 common rt_sigsuspend sys_rt_sigsuspend | 139 | 130 common rt_sigsuspend sys_rt_sigsuspend |
140 | 131 64 sigaltstack stub_sigaltstack | 140 | 131 64 sigaltstack sys_sigaltstack |
141 | 132 common utime sys_utime | 141 | 132 common utime sys_utime |
142 | 133 common mknod sys_mknod | 142 | 133 common mknod sys_mknod |
143 | 134 64 uselib | 143 | 134 64 uselib |
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig index 0fd20f241e40..96b89d874ead 100644 --- a/arch/x86/um/Kconfig +++ b/arch/x86/um/Kconfig | |||
@@ -13,6 +13,7 @@ endmenu | |||
13 | config UML_X86 | 13 | config UML_X86 |
14 | def_bool y | 14 | def_bool y |
15 | select GENERIC_FIND_FIRST_BIT | 15 | select GENERIC_FIND_FIRST_BIT |
16 | select GENERIC_SIGALTSTACK | ||
16 | 17 | ||
17 | config 64BIT | 18 | config 64BIT |
18 | bool "64-bit kernel" if SUBARCH = "x86" | 19 | bool "64-bit kernel" if SUBARCH = "x86" |
diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index 812e98c098e4..a0c3b0d1a122 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #define ptregs_iopl sys_iopl | 27 | #define ptregs_iopl sys_iopl |
28 | #define ptregs_vm86old sys_vm86old | 28 | #define ptregs_vm86old sys_vm86old |
29 | #define ptregs_vm86 sys_vm86 | 29 | #define ptregs_vm86 sys_vm86 |
30 | #define ptregs_sigaltstack sys_sigaltstack | ||
31 | 30 | ||
32 | #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void sym(void) ; | 31 | #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void sym(void) ; |
33 | #include <asm/syscalls_32.h> | 32 | #include <asm/syscalls_32.h> |
diff --git a/arch/x86/um/sys_call_table_64.c b/arch/x86/um/sys_call_table_64.c index 170bd926a69c..f2f0723070ca 100644 --- a/arch/x86/um/sys_call_table_64.c +++ b/arch/x86/um/sys_call_table_64.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #define stub_fork sys_fork | 31 | #define stub_fork sys_fork |
32 | #define stub_vfork sys_vfork | 32 | #define stub_vfork sys_vfork |
33 | #define stub_execve sys_execve | 33 | #define stub_execve sys_execve |
34 | #define stub_sigaltstack sys_sigaltstack | ||
35 | #define stub_rt_sigreturn sys_rt_sigreturn | 34 | #define stub_rt_sigreturn sys_rt_sigreturn |
36 | 35 | ||
37 | #define __SYSCALL_COMMON(nr, sym, compat) __SYSCALL_64(nr, sym, compat) | 36 | #define __SYSCALL_COMMON(nr, sym, compat) __SYSCALL_64(nr, sym, compat) |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 9fe5f946526e..6ca1e08210c6 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -63,6 +63,7 @@ struct getcpu_cache; | |||
63 | struct old_linux_dirent; | 63 | struct old_linux_dirent; |
64 | struct perf_event_attr; | 64 | struct perf_event_attr; |
65 | struct file_handle; | 65 | struct file_handle; |
66 | struct sigaltstack; | ||
66 | 67 | ||
67 | #include <linux/types.h> | 68 | #include <linux/types.h> |
68 | #include <linux/aio_abi.h> | 69 | #include <linux/aio_abi.h> |
@@ -299,6 +300,11 @@ asmlinkage long sys_personality(unsigned int personality); | |||
299 | asmlinkage long sys_sigpending(old_sigset_t __user *set); | 300 | asmlinkage long sys_sigpending(old_sigset_t __user *set); |
300 | asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, | 301 | asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, |
301 | old_sigset_t __user *oset); | 302 | old_sigset_t __user *oset); |
303 | #ifdef CONFIG_GENERIC_SIGALTSTACK | ||
304 | asmlinkage long sys_sigaltstack(const struct sigaltstack __user *uss, | ||
305 | struct sigaltstack __user *uoss); | ||
306 | #endif | ||
307 | |||
302 | asmlinkage long sys_getitimer(int which, struct itimerval __user *value); | 308 | asmlinkage long sys_getitimer(int which, struct itimerval __user *value); |
303 | asmlinkage long sys_setitimer(int which, | 309 | asmlinkage long sys_setitimer(int which, |
304 | struct itimerval __user *value, | 310 | struct itimerval __user *value, |
diff --git a/kernel/signal.c b/kernel/signal.c index 887f2fefe207..f05f4c4150d9 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -3102,6 +3102,12 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s | |||
3102 | out: | 3102 | out: |
3103 | return error; | 3103 | return error; |
3104 | } | 3104 | } |
3105 | #ifdef CONFIG_GENERIC_SIGALTSTACK | ||
3106 | SYSCALL_DEFINE2(sigaltstack,const stack_t __user *,uss, stack_t __user *,uoss) | ||
3107 | { | ||
3108 | return do_sigaltstack(uss, uoss, current_user_stack_pointer()); | ||
3109 | } | ||
3110 | #endif | ||
3105 | 3111 | ||
3106 | int restore_altstack(const stack_t __user *uss) | 3112 | int restore_altstack(const stack_t __user *uss) |
3107 | { | 3113 | { |