diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 21:50:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 21:50:11 -0500 |
commit | 9e2d59ad580d590134285f361a0e80f0e98c0207 (patch) | |
tree | f3232be75781484193413f32ec82c21f6d8eb76e /arch/x86/include | |
parent | 5ce1a70e2f00f0bce0cab57f798ca354b9496169 (diff) | |
parent | 235b80226b986dabcbba844968f7807866bd0bfe (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull signal handling cleanups from Al Viro:
"This is the first pile; another one will come a bit later and will
contain SYSCALL_DEFINE-related patches.
- a bunch of signal-related syscalls (both native and compat)
unified.
- a bunch of compat syscalls switched to COMPAT_SYSCALL_DEFINE
(fixing several potential problems with missing argument
validation, while we are at it)
- a lot of now-pointless wrappers killed
- a couple of architectures (cris and hexagon) forgot to save
altstack settings into sigframe, even though they used the
(uninitialized) values in sigreturn; fixed.
- microblaze fixes for delivery of multiple signals arriving at once
- saner set of helpers for signal delivery introduced, several
architectures switched to using those."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (143 commits)
x86: convert to ksignal
sparc: convert to ksignal
arm: switch to struct ksignal * passing
alpha: pass k_sigaction and siginfo_t using ksignal pointer
burying unused conditionals
make do_sigaltstack() static
arm64: switch to generic old sigaction() (compat-only)
arm64: switch to generic compat rt_sigaction()
arm64: switch compat to generic old sigsuspend
arm64: switch to generic compat rt_sigqueueinfo()
arm64: switch to generic compat rt_sigpending()
arm64: switch to generic compat rt_sigprocmask()
arm64: switch to generic sigaltstack
sparc: switch to generic old sigsuspend
sparc: COMPAT_SYSCALL_DEFINE does all sign-extension as well as SYSCALL_DEFINE
sparc: kill sign-extending wrappers for native syscalls
kill sparc32_open()
sparc: switch to use of generic old sigaction
sparc: switch sys_compat_rt_sigaction() to COMPAT_SYSCALL_DEFINE
mips: switch to generic sys_fork() and sys_clone()
...
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/fpu-internal.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/ia32.h | 15 | ||||
-rw-r--r-- | arch/x86/include/asm/signal.h | 22 | ||||
-rw-r--r-- | arch/x86/include/asm/sys_ia32.h | 16 | ||||
-rw-r--r-- | arch/x86/include/asm/syscalls.h | 13 | ||||
-rw-r--r-- | arch/x86/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/x86/include/uapi/asm/signal.h | 8 |
7 files changed, 14 insertions, 67 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 41ab26ea6564..e25cc33ec54d 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h | |||
@@ -26,9 +26,10 @@ | |||
26 | #ifdef CONFIG_X86_64 | 26 | #ifdef CONFIG_X86_64 |
27 | # include <asm/sigcontext32.h> | 27 | # include <asm/sigcontext32.h> |
28 | # include <asm/user32.h> | 28 | # include <asm/user32.h> |
29 | int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 29 | struct ksignal; |
30 | int ia32_setup_rt_frame(int sig, struct ksignal *ksig, | ||
30 | compat_sigset_t *set, struct pt_regs *regs); | 31 | compat_sigset_t *set, struct pt_regs *regs); |
31 | int ia32_setup_frame(int sig, struct k_sigaction *ka, | 32 | int ia32_setup_frame(int sig, struct ksignal *ksig, |
32 | compat_sigset_t *set, struct pt_regs *regs); | 33 | compat_sigset_t *set, struct pt_regs *regs); |
33 | #else | 34 | #else |
34 | # define user_i387_ia32_struct user_i387_struct | 35 | # define user_i387_ia32_struct user_i387_struct |
diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h index 4c6da2e4bb1d..d0e8e0141041 100644 --- a/arch/x86/include/asm/ia32.h +++ b/arch/x86/include/asm/ia32.h | |||
@@ -13,21 +13,6 @@ | |||
13 | #include <asm/sigcontext32.h> | 13 | #include <asm/sigcontext32.h> |
14 | 14 | ||
15 | /* signal.h */ | 15 | /* signal.h */ |
16 | struct sigaction32 { | ||
17 | unsigned int sa_handler; /* Really a pointer, but need to deal | ||
18 | with 32 bits */ | ||
19 | unsigned int sa_flags; | ||
20 | unsigned int sa_restorer; /* Another 32 bit pointer */ | ||
21 | compat_sigset_t sa_mask; /* A 32 bit mask */ | ||
22 | }; | ||
23 | |||
24 | struct old_sigaction32 { | ||
25 | unsigned int sa_handler; /* Really a pointer, but need to deal | ||
26 | with 32 bits */ | ||
27 | compat_old_sigset_t sa_mask; /* A 32 bit mask */ | ||
28 | unsigned int sa_flags; | ||
29 | unsigned int sa_restorer; /* Another 32 bit pointer */ | ||
30 | }; | ||
31 | 16 | ||
32 | struct ucontext_ia32 { | 17 | struct ucontext_ia32 { |
33 | unsigned int uc_flags; | 18 | unsigned int uc_flags; |
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h index 216bf364a7e7..35e67a457182 100644 --- a/arch/x86/include/asm/signal.h +++ b/arch/x86/include/asm/signal.h | |||
@@ -31,27 +31,9 @@ typedef sigset_t compat_sigset_t; | |||
31 | #include <uapi/asm/signal.h> | 31 | #include <uapi/asm/signal.h> |
32 | #ifndef __ASSEMBLY__ | 32 | #ifndef __ASSEMBLY__ |
33 | extern void do_notify_resume(struct pt_regs *, void *, __u32); | 33 | extern void do_notify_resume(struct pt_regs *, void *, __u32); |
34 | #ifdef __i386__ | ||
35 | struct old_sigaction { | ||
36 | __sighandler_t sa_handler; | ||
37 | old_sigset_t sa_mask; | ||
38 | unsigned long sa_flags; | ||
39 | __sigrestore_t sa_restorer; | ||
40 | }; | ||
41 | |||
42 | struct sigaction { | ||
43 | __sighandler_t sa_handler; | ||
44 | unsigned long sa_flags; | ||
45 | __sigrestore_t sa_restorer; | ||
46 | sigset_t sa_mask; /* mask last for extensibility */ | ||
47 | }; | ||
48 | |||
49 | struct k_sigaction { | ||
50 | struct sigaction sa; | ||
51 | }; | ||
52 | 34 | ||
53 | #else /* __i386__ */ | 35 | #define __ARCH_HAS_SA_RESTORER |
54 | #endif /* !__i386__ */ | 36 | |
55 | #include <asm/sigcontext.h> | 37 | #include <asm/sigcontext.h> |
56 | 38 | ||
57 | #ifdef __i386__ | 39 | #ifdef __i386__ |
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h index 31f61f96e0fb..0218d917f509 100644 --- a/arch/x86/include/asm/sys_ia32.h +++ b/arch/x86/include/asm/sys_ia32.h | |||
@@ -32,22 +32,11 @@ struct mmap_arg_struct32; | |||
32 | asmlinkage long sys32_mmap(struct mmap_arg_struct32 __user *); | 32 | asmlinkage long sys32_mmap(struct mmap_arg_struct32 __user *); |
33 | asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long); | 33 | asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long); |
34 | 34 | ||
35 | struct sigaction32; | ||
36 | struct old_sigaction32; | ||
37 | asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *, | ||
38 | struct sigaction32 __user *, unsigned int); | ||
39 | asmlinkage long sys32_sigaction(int, struct old_sigaction32 __user *, | ||
40 | struct old_sigaction32 __user *); | ||
41 | asmlinkage long sys32_alarm(unsigned int); | 35 | asmlinkage long sys32_alarm(unsigned int); |
42 | 36 | ||
43 | asmlinkage long sys32_waitpid(compat_pid_t, unsigned int __user *, int); | 37 | asmlinkage long sys32_waitpid(compat_pid_t, unsigned int __user *, int); |
44 | asmlinkage long sys32_sysfs(int, u32, u32); | 38 | asmlinkage long sys32_sysfs(int, u32, u32); |
45 | 39 | ||
46 | asmlinkage long sys32_sched_rr_get_interval(compat_pid_t, | ||
47 | struct compat_timespec __user *); | ||
48 | asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *, compat_size_t); | ||
49 | asmlinkage long sys32_rt_sigqueueinfo(int, int, compat_siginfo_t __user *); | ||
50 | |||
51 | asmlinkage long sys32_pread(unsigned int, char __user *, u32, u32, u32); | 40 | asmlinkage long sys32_pread(unsigned int, char __user *, u32, u32, u32); |
52 | asmlinkage long sys32_pwrite(unsigned int, const char __user *, u32, u32, u32); | 41 | asmlinkage long sys32_pwrite(unsigned int, const char __user *, u32, u32, u32); |
53 | 42 | ||
@@ -68,9 +57,8 @@ asmlinkage long sys32_fallocate(int, int, unsigned, | |||
68 | unsigned, unsigned, unsigned); | 57 | unsigned, unsigned, unsigned); |
69 | 58 | ||
70 | /* ia32/ia32_signal.c */ | 59 | /* ia32/ia32_signal.c */ |
71 | asmlinkage long sys32_sigsuspend(int, int, old_sigset_t); | 60 | asmlinkage long sys32_sigreturn(void); |
72 | asmlinkage long sys32_sigreturn(struct pt_regs *); | 61 | asmlinkage long sys32_rt_sigreturn(void); |
73 | asmlinkage long sys32_rt_sigreturn(struct pt_regs *); | ||
74 | 62 | ||
75 | /* ia32/ipc32.c */ | 63 | /* ia32/ipc32.c */ |
76 | asmlinkage long sys32_ipc(u32, int, int, int, compat_uptr_t, u32); | 64 | asmlinkage long sys32_ipc(u32, int, int, int, compat_uptr_t, u32); |
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index 58b7e3eac0ae..6cf0a9cc60cd 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
@@ -18,13 +18,13 @@ | |||
18 | /* Common in X86_32 and X86_64 */ | 18 | /* Common in X86_32 and X86_64 */ |
19 | /* kernel/ioport.c */ | 19 | /* kernel/ioport.c */ |
20 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); | 20 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); |
21 | long sys_iopl(unsigned int, struct pt_regs *); | 21 | asmlinkage long sys_iopl(unsigned int); |
22 | 22 | ||
23 | /* kernel/ldt.c */ | 23 | /* kernel/ldt.c */ |
24 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); | 24 | 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(void); |
28 | 28 | ||
29 | /* kernel/tls.c */ | 29 | /* kernel/tls.c */ |
30 | asmlinkage int sys_set_thread_area(struct user_desc __user *); | 30 | asmlinkage int sys_set_thread_area(struct user_desc __user *); |
@@ -34,14 +34,11 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *); | |||
34 | #ifdef CONFIG_X86_32 | 34 | #ifdef CONFIG_X86_32 |
35 | 35 | ||
36 | /* kernel/signal.c */ | 36 | /* kernel/signal.c */ |
37 | asmlinkage int sys_sigsuspend(int, int, old_sigset_t); | 37 | unsigned long sys_sigreturn(void); |
38 | asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, | ||
39 | struct old_sigaction __user *); | ||
40 | unsigned long sys_sigreturn(struct pt_regs *); | ||
41 | 38 | ||
42 | /* kernel/vm86_32.c */ | 39 | /* kernel/vm86_32.c */ |
43 | int sys_vm86old(struct vm86_struct __user *, struct pt_regs *); | 40 | int sys_vm86old(struct vm86_struct __user *); |
44 | int sys_vm86(unsigned long, unsigned long, struct pt_regs *); | 41 | int sys_vm86(unsigned long, unsigned long); |
45 | 42 | ||
46 | #else /* CONFIG_X86_32 */ | 43 | #else /* CONFIG_X86_32 */ |
47 | 44 | ||
diff --git a/arch/x86/include/asm/unistd.h b/arch/x86/include/asm/unistd.h index a0790e07ba65..3d5df1c4447f 100644 --- a/arch/x86/include/asm/unistd.h +++ b/arch/x86/include/asm/unistd.h | |||
@@ -38,8 +38,6 @@ | |||
38 | # define __ARCH_WANT_SYS_OLD_GETRLIMIT | 38 | # define __ARCH_WANT_SYS_OLD_GETRLIMIT |
39 | # define __ARCH_WANT_SYS_OLD_UNAME | 39 | # define __ARCH_WANT_SYS_OLD_UNAME |
40 | # define __ARCH_WANT_SYS_PAUSE | 40 | # define __ARCH_WANT_SYS_PAUSE |
41 | # define __ARCH_WANT_SYS_RT_SIGACTION | ||
42 | # define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
43 | # define __ARCH_WANT_SYS_SGETMASK | 41 | # define __ARCH_WANT_SYS_SGETMASK |
44 | # define __ARCH_WANT_SYS_SIGNAL | 42 | # define __ARCH_WANT_SYS_SIGNAL |
45 | # define __ARCH_WANT_SYS_SIGPENDING | 43 | # define __ARCH_WANT_SYS_SIGPENDING |
diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h index aa7d6ae39e0e..8264f47cf53e 100644 --- a/arch/x86/include/uapi/asm/signal.h +++ b/arch/x86/include/uapi/asm/signal.h | |||
@@ -95,9 +95,9 @@ typedef unsigned long sigset_t; | |||
95 | #ifndef __ASSEMBLY__ | 95 | #ifndef __ASSEMBLY__ |
96 | 96 | ||
97 | 97 | ||
98 | #ifdef __i386__ | ||
99 | # ifndef __KERNEL__ | 98 | # ifndef __KERNEL__ |
100 | /* Here we must cater to libcs that poke about in kernel headers. */ | 99 | /* Here we must cater to libcs that poke about in kernel headers. */ |
100 | #ifdef __i386__ | ||
101 | 101 | ||
102 | struct sigaction { | 102 | struct sigaction { |
103 | union { | 103 | union { |
@@ -112,7 +112,6 @@ struct sigaction { | |||
112 | #define sa_handler _u._sa_handler | 112 | #define sa_handler _u._sa_handler |
113 | #define sa_sigaction _u._sa_sigaction | 113 | #define sa_sigaction _u._sa_sigaction |
114 | 114 | ||
115 | # endif /* ! __KERNEL__ */ | ||
116 | #else /* __i386__ */ | 115 | #else /* __i386__ */ |
117 | 116 | ||
118 | struct sigaction { | 117 | struct sigaction { |
@@ -122,11 +121,8 @@ struct sigaction { | |||
122 | sigset_t sa_mask; /* mask last for extensibility */ | 121 | sigset_t sa_mask; /* mask last for extensibility */ |
123 | }; | 122 | }; |
124 | 123 | ||
125 | struct k_sigaction { | ||
126 | struct sigaction sa; | ||
127 | }; | ||
128 | |||
129 | #endif /* !__i386__ */ | 124 | #endif /* !__i386__ */ |
125 | # endif /* ! __KERNEL__ */ | ||
130 | 126 | ||
131 | typedef struct sigaltstack { | 127 | typedef struct sigaltstack { |
132 | void __user *ss_sp; | 128 | void __user *ss_sp; |