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/unicore32/kernel | |
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/unicore32/kernel')
-rw-r--r-- | arch/unicore32/kernel/entry.S | 5 | ||||
-rw-r--r-- | arch/unicore32/kernel/signal.c | 12 |
2 files changed, 2 insertions, 15 deletions
diff --git a/arch/unicore32/kernel/entry.S b/arch/unicore32/kernel/entry.S index 581630d91444..bcdedd80890e 100644 --- a/arch/unicore32/kernel/entry.S +++ b/arch/unicore32/kernel/entry.S | |||
@@ -674,11 +674,6 @@ ENTRY(sys_rt_sigreturn) | |||
674 | b __sys_rt_sigreturn | 674 | b __sys_rt_sigreturn |
675 | ENDPROC(sys_rt_sigreturn) | 675 | ENDPROC(sys_rt_sigreturn) |
676 | 676 | ||
677 | ENTRY(sys_sigaltstack) | ||
678 | ldw r2, [sp+], #S_OFF + S_SP | ||
679 | b do_sigaltstack | ||
680 | ENDPROC(sys_sigaltstack) | ||
681 | |||
682 | __INIT | 677 | __INIT |
683 | 678 | ||
684 | /* | 679 | /* |
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c index b8b2ffd774d6..6905f0ebdc77 100644 --- a/arch/unicore32/kernel/signal.c +++ b/arch/unicore32/kernel/signal.c | |||
@@ -123,8 +123,7 @@ asmlinkage int __sys_rt_sigreturn(struct pt_regs *regs) | |||
123 | if (restore_sigframe(regs, &frame->sig)) | 123 | if (restore_sigframe(regs, &frame->sig)) |
124 | goto badframe; | 124 | goto badframe; |
125 | 125 | ||
126 | if (do_sigaltstack(&frame->sig.uc.uc_stack, NULL, regs->UCreg_sp) | 126 | if (restore_altstack(&frame->sig.uc.uc_stack)) |
127 | == -EFAULT) | ||
128 | goto badframe; | 127 | goto badframe; |
129 | 128 | ||
130 | return regs->UCreg_00; | 129 | return regs->UCreg_00; |
@@ -265,7 +264,6 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, | |||
265 | { | 264 | { |
266 | struct rt_sigframe __user *frame = | 265 | struct rt_sigframe __user *frame = |
267 | get_sigframe(ka, regs, sizeof(*frame)); | 266 | get_sigframe(ka, regs, sizeof(*frame)); |
268 | stack_t stack; | ||
269 | int err = 0; | 267 | int err = 0; |
270 | 268 | ||
271 | if (!frame) | 269 | if (!frame) |
@@ -275,13 +273,7 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, | |||
275 | 273 | ||
276 | err |= __put_user(0, &frame->sig.uc.uc_flags); | 274 | err |= __put_user(0, &frame->sig.uc.uc_flags); |
277 | err |= __put_user(NULL, &frame->sig.uc.uc_link); | 275 | err |= __put_user(NULL, &frame->sig.uc.uc_link); |
278 | 276 | err |= __save_altstack(&frame->sig.uc.uc_stack, regs->UCreg_sp); | |
279 | memset(&stack, 0, sizeof(stack)); | ||
280 | stack.ss_sp = (void __user *)current->sas_ss_sp; | ||
281 | stack.ss_flags = sas_ss_flags(regs->UCreg_sp); | ||
282 | stack.ss_size = current->sas_ss_size; | ||
283 | err |= __copy_to_user(&frame->sig.uc.uc_stack, &stack, sizeof(stack)); | ||
284 | |||
285 | err |= setup_sigframe(&frame->sig, regs, set); | 277 | err |= setup_sigframe(&frame->sig, regs, set); |
286 | if (err == 0) | 278 | if (err == 0) |
287 | err |= setup_return(regs, ka, frame->sig.retcode, frame, usig); | 279 | err |= setup_return(regs, ka, frame->sig.retcode, frame, usig); |