diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-27 13:58:59 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:58:51 -0400 |
commit | 77097ae503b170120ab66dd1d547f8577193f91f (patch) | |
tree | bee5b2e8d91b9ec8ab74c58cbec1796c7bacc2e5 /arch/x86 | |
parent | edd63a2763bdae0daa4f0a4d4c5d61d1154352a5 (diff) |
most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set
Only 3 out of 63 do not. Renamed the current variant to __set_current_blocked(),
added set_current_blocked() that will exclude unblockable signals, switched
open-coded instances to it.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/ia32/ia32_signal.c | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/sighandling.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/signal.c | 3 | ||||
-rw-r--r-- | arch/x86/um/signal.c | 2 |
4 files changed, 0 insertions, 9 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index 98bd70faccc5..daeca56211e3 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -273,7 +273,6 @@ asmlinkage long sys32_sigreturn(struct pt_regs *regs) | |||
273 | sizeof(frame->extramask)))) | 273 | sizeof(frame->extramask)))) |
274 | goto badframe; | 274 | goto badframe; |
275 | 275 | ||
276 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
277 | set_current_blocked(&set); | 276 | set_current_blocked(&set); |
278 | 277 | ||
279 | if (ia32_restore_sigcontext(regs, &frame->sc, &ax)) | 278 | if (ia32_restore_sigcontext(regs, &frame->sc, &ax)) |
@@ -299,7 +298,6 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs) | |||
299 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 298 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
300 | goto badframe; | 299 | goto badframe; |
301 | 300 | ||
302 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
303 | set_current_blocked(&set); | 301 | set_current_blocked(&set); |
304 | 302 | ||
305 | if (ia32_restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax)) | 303 | if (ia32_restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax)) |
diff --git a/arch/x86/include/asm/sighandling.h b/arch/x86/include/asm/sighandling.h index ada93b3b8c66..beff97f7df37 100644 --- a/arch/x86/include/asm/sighandling.h +++ b/arch/x86/include/asm/sighandling.h | |||
@@ -7,8 +7,6 @@ | |||
7 | 7 | ||
8 | #include <asm/processor-flags.h> | 8 | #include <asm/processor-flags.h> |
9 | 9 | ||
10 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | ||
11 | |||
12 | #define __FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | \ | 10 | #define __FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | \ |
13 | X86_EFLAGS_DF | X86_EFLAGS_TF | X86_EFLAGS_SF | \ | 11 | X86_EFLAGS_DF | X86_EFLAGS_TF | X86_EFLAGS_SF | \ |
14 | X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \ | 12 | X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \ |
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 700c49dcd84e..11e206f0f45a 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -555,7 +555,6 @@ unsigned long sys_sigreturn(struct pt_regs *regs) | |||
555 | sizeof(frame->extramask)))) | 555 | sizeof(frame->extramask)))) |
556 | goto badframe; | 556 | goto badframe; |
557 | 557 | ||
558 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
559 | set_current_blocked(&set); | 558 | set_current_blocked(&set); |
560 | 559 | ||
561 | if (restore_sigcontext(regs, &frame->sc, &ax)) | 560 | if (restore_sigcontext(regs, &frame->sc, &ax)) |
@@ -581,7 +580,6 @@ long sys_rt_sigreturn(struct pt_regs *regs) | |||
581 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 580 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
582 | goto badframe; | 581 | goto badframe; |
583 | 582 | ||
584 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
585 | set_current_blocked(&set); | 583 | set_current_blocked(&set); |
586 | 584 | ||
587 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax)) | 585 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax)) |
@@ -915,7 +913,6 @@ asmlinkage long sys32_x32_rt_sigreturn(struct pt_regs *regs) | |||
915 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) | 913 | if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) |
916 | goto badframe; | 914 | goto badframe; |
917 | 915 | ||
918 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
919 | set_current_blocked(&set); | 916 | set_current_blocked(&set); |
920 | 917 | ||
921 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax)) | 918 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax)) |
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c index bb0fb03b9f85..a508cea13503 100644 --- a/arch/x86/um/signal.c +++ b/arch/x86/um/signal.c | |||
@@ -486,7 +486,6 @@ long sys_sigreturn(struct pt_regs *regs) | |||
486 | copy_from_user(&set.sig[1], extramask, sig_size)) | 486 | copy_from_user(&set.sig[1], extramask, sig_size)) |
487 | goto segfault; | 487 | goto segfault; |
488 | 488 | ||
489 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
490 | set_current_blocked(&set); | 489 | set_current_blocked(&set); |
491 | 490 | ||
492 | if (copy_sc_from_user(¤t->thread.regs, sc)) | 491 | if (copy_sc_from_user(¤t->thread.regs, sc)) |
@@ -600,7 +599,6 @@ long sys_rt_sigreturn(struct pt_regs *regs) | |||
600 | if (copy_from_user(&set, &uc->uc_sigmask, sizeof(set))) | 599 | if (copy_from_user(&set, &uc->uc_sigmask, sizeof(set))) |
601 | goto segfault; | 600 | goto segfault; |
602 | 601 | ||
603 | sigdelsetmask(&set, ~_BLOCKABLE); | ||
604 | set_current_blocked(&set); | 602 | set_current_blocked(&set); |
605 | 603 | ||
606 | if (copy_sc_from_user(¤t->thread.regs, &uc->uc_mcontext)) | 604 | if (copy_sc_from_user(¤t->thread.regs, &uc->uc_mcontext)) |