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/xtensa | |
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/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/signal.h | 11 | ||||
-rw-r--r-- | arch/xtensa/include/asm/syscall.h | 7 | ||||
-rw-r--r-- | arch/xtensa/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/uapi/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/xtensa/kernel/signal.c | 18 |
5 files changed, 4 insertions, 36 deletions
diff --git a/arch/xtensa/include/asm/signal.h b/arch/xtensa/include/asm/signal.h index 6f586bd90e18..de169b4eaeef 100644 --- a/arch/xtensa/include/asm/signal.h +++ b/arch/xtensa/include/asm/signal.h | |||
@@ -15,16 +15,7 @@ | |||
15 | #include <uapi/asm/signal.h> | 15 | #include <uapi/asm/signal.h> |
16 | 16 | ||
17 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
18 | struct sigaction { | 18 | #define __ARCH_HAS_SA_RESTORER |
19 | __sighandler_t sa_handler; | ||
20 | unsigned long sa_flags; | ||
21 | void (*sa_restorer)(void); | ||
22 | sigset_t sa_mask; /* mask last for extensibility */ | ||
23 | }; | ||
24 | |||
25 | struct k_sigaction { | ||
26 | struct sigaction sa; | ||
27 | }; | ||
28 | 19 | ||
29 | #include <asm/sigcontext.h> | 20 | #include <asm/sigcontext.h> |
30 | 21 | ||
diff --git a/arch/xtensa/include/asm/syscall.h b/arch/xtensa/include/asm/syscall.h index 8d5e47fad095..3673ff1f1bc5 100644 --- a/arch/xtensa/include/asm/syscall.h +++ b/arch/xtensa/include/asm/syscall.h | |||
@@ -9,15 +9,9 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | struct pt_regs; | 11 | struct pt_regs; |
12 | struct sigaction; | ||
13 | asmlinkage long xtensa_ptrace(long, long, long, long); | 12 | asmlinkage long xtensa_ptrace(long, long, long, long); |
14 | asmlinkage long xtensa_sigreturn(struct pt_regs*); | 13 | asmlinkage long xtensa_sigreturn(struct pt_regs*); |
15 | asmlinkage long xtensa_rt_sigreturn(struct pt_regs*); | 14 | asmlinkage long xtensa_rt_sigreturn(struct pt_regs*); |
16 | asmlinkage long xtensa_sigaltstack(struct pt_regs *regs); | ||
17 | asmlinkage long sys_rt_sigaction(int, | ||
18 | const struct sigaction __user *, | ||
19 | struct sigaction __user *, | ||
20 | size_t); | ||
21 | asmlinkage long xtensa_shmat(int, char __user *, int); | 15 | asmlinkage long xtensa_shmat(int, char __user *, int); |
22 | asmlinkage long xtensa_fadvise64_64(int, int, | 16 | asmlinkage long xtensa_fadvise64_64(int, int, |
23 | unsigned long long, unsigned long long); | 17 | unsigned long long, unsigned long long); |
@@ -31,4 +25,3 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | |||
31 | struct timespec __user *tsp, | 25 | struct timespec __user *tsp, |
32 | const sigset_t __user *sigmask, | 26 | const sigset_t __user *sigmask, |
33 | size_t sigsetsize); | 27 | size_t sigsetsize); |
34 | asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize); | ||
diff --git a/arch/xtensa/include/asm/unistd.h b/arch/xtensa/include/asm/unistd.h index eb63ea87815c..c38834de9ac7 100644 --- a/arch/xtensa/include/asm/unistd.h +++ b/arch/xtensa/include/asm/unistd.h | |||
@@ -15,8 +15,6 @@ | |||
15 | #define __ARCH_WANT_STAT64 | 15 | #define __ARCH_WANT_STAT64 |
16 | #define __ARCH_WANT_SYS_UTIME | 16 | #define __ARCH_WANT_SYS_UTIME |
17 | #define __ARCH_WANT_SYS_LLSEEK | 17 | #define __ARCH_WANT_SYS_LLSEEK |
18 | #define __ARCH_WANT_SYS_RT_SIGACTION | ||
19 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
20 | #define __ARCH_WANT_SYS_GETPGRP | 18 | #define __ARCH_WANT_SYS_GETPGRP |
21 | 19 | ||
22 | /* | 20 | /* |
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h index 5162418c5d90..19fac3f543a2 100644 --- a/arch/xtensa/include/uapi/asm/unistd.h +++ b/arch/xtensa/include/uapi/asm/unistd.h | |||
@@ -483,7 +483,7 @@ __SYSCALL(222, sys_ni_syscall, 0) | |||
483 | #define __NR_restart_syscall 223 | 483 | #define __NR_restart_syscall 223 |
484 | __SYSCALL(223, sys_restart_syscall, 0) | 484 | __SYSCALL(223, sys_restart_syscall, 0) |
485 | #define __NR_sigaltstack 224 | 485 | #define __NR_sigaltstack 224 |
486 | __SYSCALL(224, xtensa_sigaltstack, 2) | 486 | __SYSCALL(224, sys_sigaltstack, 2) |
487 | #define __NR_rt_sigreturn 225 | 487 | #define __NR_rt_sigreturn 225 |
488 | __SYSCALL(225, xtensa_rt_sigreturn, 1) | 488 | __SYSCALL(225, xtensa_rt_sigreturn, 1) |
489 | #define __NR_rt_sigaction 226 | 489 | #define __NR_rt_sigaction 226 |
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index de34d6be91cd..d7590dddd084 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c | |||
@@ -265,7 +265,7 @@ asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3, | |||
265 | 265 | ||
266 | ret = regs->areg[2]; | 266 | ret = regs->areg[2]; |
267 | 267 | ||
268 | if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->areg[1]) == -EFAULT) | 268 | if (restore_altstack(&frame->uc.uc_stack)) |
269 | goto badframe; | 269 | goto badframe; |
270 | 270 | ||
271 | return ret; | 271 | return ret; |
@@ -368,11 +368,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
368 | 368 | ||
369 | err |= __put_user(0, &frame->uc.uc_flags); | 369 | err |= __put_user(0, &frame->uc.uc_flags); |
370 | err |= __put_user(0, &frame->uc.uc_link); | 370 | err |= __put_user(0, &frame->uc.uc_link); |
371 | err |= __put_user((void *)current->sas_ss_sp, | 371 | err |= __save_altstack(&frame->uc.uc_stack, regs->areg[1]); |
372 | &frame->uc.uc_stack.ss_sp); | ||
373 | err |= __put_user(sas_ss_flags(regs->areg[1]), | ||
374 | &frame->uc.uc_stack.ss_flags); | ||
375 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
376 | err |= setup_sigcontext(frame, regs); | 372 | err |= setup_sigcontext(frame, regs); |
377 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | 373 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); |
378 | 374 | ||
@@ -424,16 +420,6 @@ give_sigsegv: | |||
424 | return -EFAULT; | 420 | return -EFAULT; |
425 | } | 421 | } |
426 | 422 | ||
427 | asmlinkage long xtensa_sigaltstack(const stack_t __user *uss, | ||
428 | stack_t __user *uoss, | ||
429 | long a2, long a3, long a4, long a5, | ||
430 | struct pt_regs *regs) | ||
431 | { | ||
432 | return do_sigaltstack(uss, uoss, regs->areg[1]); | ||
433 | } | ||
434 | |||
435 | |||
436 | |||
437 | /* | 423 | /* |
438 | * Note that 'init' is a special process: it doesn't get signals it doesn't | 424 | * Note that 'init' is a special process: it doesn't get signals it doesn't |
439 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | 425 | * want to handle. Thus you cannot kill init even with a SIGKILL even by |