2 * arch/sh/kernel/signal_64.c
4 * Copyright (C) 2000, 2001 Paolo Alberelli
5 * Copyright (C) 2003 - 2008 Paul Mundt
6 * Copyright (C) 2004 Richard Curnow
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
12 #include <linux/rwsem.h>
13 #include <linux/sched.h>
15 #include <linux/smp.h>
16 #include <linux/kernel.h>
17 #include <linux/signal.h>
18 #include <linux/errno.h>
19 #include <linux/wait.h>
20 #include <linux/personality.h>
21 #include <linux/freezer.h>
22 #include <linux/ptrace.h>
23 #include <linux/unistd.h>
24 #include <linux/stddef.h>
25 #include <linux/tracehook.h>
26 #include <asm/ucontext.h>
27 #include <asm/uaccess.h>
28 #include <asm/pgtable.h>
29 #include <asm/cacheflush.h>
38 #define REF_REG_RET regs->regs[REG_RET]
39 #define REF_REG_SP regs->regs[REG_SP]
40 #define DEREF_REG_PR regs->regs[REG_PR]
44 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
47 handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
48 sigset_t *oldset, struct pt_regs * regs);
51 handle_syscall_restart(struct pt_regs *regs, struct sigaction *sa)
53 /* If we're not from a syscall, bail out */
54 if (regs->syscall_nr < 0)
57 /* check for system call restart.. */
58 switch (regs->regs[REG_RET]) {
59 case -ERESTART_RESTARTBLOCK:
61 no_system_call_restart:
62 regs->regs[REG_RET] = -EINTR;
67 if (!(sa->sa_flags & SA_RESTART))
68 goto no_system_call_restart;
71 /* Decode syscall # */
72 regs->regs[REG_RET] = regs->syscall_nr;
79 * Note that 'init' is a special process: it doesn't get signals it doesn't
80 * want to handle. Thus you cannot kill init even with a SIGKILL even by
83 * Note that we go through the signals twice: once to check the signals that
84 * the kernel can handle, and then we build all the user-level signal handling
85 * stack-frames in one go after that.
87 static int do_signal(struct pt_regs *regs, sigset_t *oldset)
91 struct k_sigaction ka;
94 * We want the common case to go fast, which
95 * is why we may in certain cases get here from
96 * kernel mode. Just return without doing anything
105 if (test_thread_flag(TIF_RESTORE_SIGMASK))
106 oldset = ¤t->saved_sigmask;
108 oldset = ¤t->blocked;
110 signr = get_signal_to_deliver(&info, &ka, regs, 0);
113 handle_syscall_restart(regs, &ka.sa);
115 /* Whee! Actually deliver the signal. */
116 if (handle_signal(signr, &info, &ka, oldset, regs) == 0) {
118 * If a signal was successfully delivered, the
119 * saved sigmask is in its frame, and we can
120 * clear the TIF_RESTORE_SIGMASK flag.
122 if (test_thread_flag(TIF_RESTORE_SIGMASK))
123 clear_thread_flag(TIF_RESTORE_SIGMASK);
125 tracehook_signal_handler(signr, &info, &ka, regs, 0);
131 /* Did we come from a system call? */
132 if (regs->syscall_nr >= 0) {
133 /* Restart the system call - no handlers present */
134 switch (regs->regs[REG_RET]) {
135 case -ERESTARTNOHAND:
137 case -ERESTARTNOINTR:
138 /* Decode Syscall # */
139 regs->regs[REG_RET] = regs->syscall_nr;
143 case -ERESTART_RESTARTBLOCK:
144 regs->regs[REG_RET] = __NR_restart_syscall;
150 /* No signal to deliver -- put the saved sigmask back */
151 if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
152 clear_thread_flag(TIF_RESTORE_SIGMASK);
153 sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL);
160 * Atomically swap in the new signal mask, and wait for a signal.
163 sys_sigsuspend(old_sigset_t mask,
164 unsigned long r3, unsigned long r4, unsigned long r5,
165 unsigned long r6, unsigned long r7,
166 struct pt_regs * regs)
171 spin_lock_irq(¤t->sighand->siglock);
172 saveset = current->blocked;
173 siginitset(¤t->blocked, mask);
175 spin_unlock_irq(¤t->sighand->siglock);
177 REF_REG_RET = -EINTR;
179 current->state = TASK_INTERRUPTIBLE;
181 regs->pc += 4; /* because sys_sigreturn decrements the pc */
182 if (do_signal(regs, &saveset)) {
183 /* pc now points at signal handler. Need to decrement
184 it because entry.S will increment it. */
192 sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize,
193 unsigned long r4, unsigned long r5, unsigned long r6,
195 struct pt_regs * regs)
197 sigset_t saveset, newset;
199 /* XXX: Don't preclude handling different sized sigset_t's. */
200 if (sigsetsize != sizeof(sigset_t))
203 if (copy_from_user(&newset, unewset, sizeof(newset)))
205 sigdelsetmask(&newset, ~_BLOCKABLE);
206 spin_lock_irq(¤t->sighand->siglock);
207 saveset = current->blocked;
208 current->blocked = newset;
210 spin_unlock_irq(¤t->sighand->siglock);
212 REF_REG_RET = -EINTR;
214 current->state = TASK_INTERRUPTIBLE;
216 regs->pc += 4; /* because sys_sigreturn decrements the pc */
217 if (do_signal(regs, &saveset)) {
218 /* pc now points at signal handler. Need to decrement
219 it because entry.S will increment it. */
227 sys_sigaction(int sig, const struct old_sigaction __user *act,
228 struct old_sigaction __user *oact)
230 struct k_sigaction new_ka, old_ka;
235 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
236 __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
237 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
239 __get_user(new_ka.sa.sa_flags, &act->sa_flags);
240 __get_user(mask, &act->sa_mask);
241 siginitset(&new_ka.sa.sa_mask, mask);
244 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
247 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
248 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
249 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
251 __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
252 __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
259 sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
260 unsigned long r4, unsigned long r5, unsigned long r6,
262 struct pt_regs * regs)
264 return do_sigaltstack(uss, uoss, REF_REG_SP);
268 * Do a signal return; undo the signal stack.
271 struct sigcontext sc;
272 unsigned long extramask[_NSIG_WORDS-1];
273 long long retcode[2];
277 struct siginfo __user *pinfo;
281 long long retcode[2];
286 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
291 err |= __get_user (fpvalid, &sc->sc_fpvalid);
292 conditional_used_math(fpvalid);
296 if (current == last_task_used_math) {
297 last_task_used_math = NULL;
301 err |= __copy_from_user(¤t->thread.fpu.hard, &sc->sc_fpregs[0],
302 (sizeof(long long) * 32) + (sizeof(int) * 1));
308 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
313 fpvalid = !!used_math();
314 err |= __put_user(fpvalid, &sc->sc_fpvalid);
318 if (current == last_task_used_math) {
320 save_fpu(current, regs);
322 last_task_used_math = NULL;
326 err |= __copy_to_user(&sc->sc_fpregs[0], ¤t->thread.fpu.hard,
327 (sizeof(long long) * 32) + (sizeof(int) * 1));
334 restore_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
339 setup_sigcontext_fpu(struct pt_regs *regs, struct sigcontext __user *sc)
346 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, long long *r2_p)
348 unsigned int err = 0;
349 unsigned long long current_sr, new_sr;
350 #define SR_MASK 0xffff8cfd
352 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x)
354 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]);
355 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]);
356 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]);
357 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]);
358 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]);
359 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]);
360 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]);
361 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]);
362 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]);
363 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]);
364 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]);
365 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]);
366 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]);
367 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]);
368 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]);
369 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]);
370 COPY(tregs[0]); COPY(tregs[1]); COPY(tregs[2]); COPY(tregs[3]);
371 COPY(tregs[4]); COPY(tregs[5]); COPY(tregs[6]); COPY(tregs[7]);
373 /* Prevent the signal handler manipulating SR in a way that can
374 crash the kernel. i.e. only allow S, Q, M, PR, SZ, FR to be
376 current_sr = regs->sr;
377 err |= __get_user(new_sr, &sc->sc_sr);
379 regs->sr |= (new_sr & ~SR_MASK);
385 /* Must do this last in case it sets regs->sr.fd (i.e. after rest of sr
386 * has been restored above.) */
387 err |= restore_sigcontext_fpu(regs, sc);
389 regs->syscall_nr = -1; /* disable syscall checks */
390 err |= __get_user(*r2_p, &sc->sc_regs[REG_RET]);
394 asmlinkage int sys_sigreturn(unsigned long r2, unsigned long r3,
395 unsigned long r4, unsigned long r5,
396 unsigned long r6, unsigned long r7,
397 struct pt_regs * regs)
399 struct sigframe __user *frame = (struct sigframe __user *) (long) REF_REG_SP;
403 /* Always make any pending restarted system calls return -EINTR */
404 current_thread_info()->restart_block.fn = do_no_restart_syscall;
406 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
409 if (__get_user(set.sig[0], &frame->sc.oldmask)
411 && __copy_from_user(&set.sig[1], &frame->extramask,
412 sizeof(frame->extramask))))
415 sigdelsetmask(&set, ~_BLOCKABLE);
417 spin_lock_irq(¤t->sighand->siglock);
418 current->blocked = set;
420 spin_unlock_irq(¤t->sighand->siglock);
422 if (restore_sigcontext(regs, &frame->sc, &ret))
429 force_sig(SIGSEGV, current);
433 asmlinkage int sys_rt_sigreturn(unsigned long r2, unsigned long r3,
434 unsigned long r4, unsigned long r5,
435 unsigned long r6, unsigned long r7,
436 struct pt_regs * regs)
438 struct rt_sigframe __user *frame = (struct rt_sigframe __user *) (long) REF_REG_SP;
443 /* Always make any pending restarted system calls return -EINTR */
444 current_thread_info()->restart_block.fn = do_no_restart_syscall;
446 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
449 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
452 sigdelsetmask(&set, ~_BLOCKABLE);
453 spin_lock_irq(¤t->sighand->siglock);
454 current->blocked = set;
456 spin_unlock_irq(¤t->sighand->siglock);
458 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &ret))
462 if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
464 /* It is more difficult to avoid calling this function than to
465 call it and ignore errors. */
466 do_sigaltstack(&st, NULL, REF_REG_SP);
471 force_sig(SIGSEGV, current);
476 * Set up a signal frame.
479 setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
484 /* Do this first, otherwise is this sets sr->fd, that value isn't preserved. */
485 err |= setup_sigcontext_fpu(regs, sc);
487 #define COPY(x) err |= __put_user(regs->x, &sc->sc_##x)
489 COPY(regs[0]); COPY(regs[1]); COPY(regs[2]); COPY(regs[3]);
490 COPY(regs[4]); COPY(regs[5]); COPY(regs[6]); COPY(regs[7]);
491 COPY(regs[8]); COPY(regs[9]); COPY(regs[10]); COPY(regs[11]);
492 COPY(regs[12]); COPY(regs[13]); COPY(regs[14]); COPY(regs[15]);
493 COPY(regs[16]); COPY(regs[17]); COPY(regs[18]); COPY(regs[19]);
494 COPY(regs[20]); COPY(regs[21]); COPY(regs[22]); COPY(regs[23]);
495 COPY(regs[24]); COPY(regs[25]); COPY(regs[26]); COPY(regs[27]);
496 COPY(regs[28]); COPY(regs[29]); COPY(regs[30]); COPY(regs[31]);
497 COPY(regs[32]); COPY(regs[33]); COPY(regs[34]); COPY(regs[35]);
498 COPY(regs[36]); COPY(regs[37]); COPY(regs[38]); COPY(regs[39]);
499 COPY(regs[40]); COPY(regs[41]); COPY(regs[42]); COPY(regs[43]);
500 COPY(regs[44]); COPY(regs[45]); COPY(regs[46]); COPY(regs[47]);
501 COPY(regs[48]); COPY(regs[49]); COPY(regs[50]); COPY(regs[51]);
502 COPY(regs[52]); COPY(regs[53]); COPY(regs[54]); COPY(regs[55]);
503 COPY(regs[56]); COPY(regs[57]); COPY(regs[58]); COPY(regs[59]);
504 COPY(regs[60]); COPY(regs[61]); COPY(regs[62]);
505 COPY(tregs[0]); COPY(tregs[1]); COPY(tregs[2]); COPY(tregs[3]);
506 COPY(tregs[4]); COPY(tregs[5]); COPY(tregs[6]); COPY(tregs[7]);
511 err |= __put_user(mask, &sc->oldmask);
517 * Determine which stack to use..
519 static inline void __user *
520 get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
522 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
523 sp = current->sas_ss_sp + current->sas_ss_size;
525 return (void __user *)((sp - frame_size) & -8ul);
528 void sa_default_restorer(void); /* See comments below */
529 void sa_default_rt_restorer(void); /* See comments below */
531 static int setup_frame(int sig, struct k_sigaction *ka,
532 sigset_t *set, struct pt_regs *regs)
534 struct sigframe __user *frame;
538 frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame));
540 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
543 signal = current_thread_info()->exec_domain
544 && current_thread_info()->exec_domain->signal_invmap
546 ? current_thread_info()->exec_domain->signal_invmap[sig]
549 err |= setup_sigcontext(&frame->sc, regs, set->sig[0]);
551 /* Give up earlier as i386, in case */
555 if (_NSIG_WORDS > 1) {
556 err |= __copy_to_user(frame->extramask, &set->sig[1],
557 sizeof(frame->extramask)); }
559 /* Give up earlier as i386, in case */
563 /* Set up to return from userspace. If provided, use a stub
564 already in userspace. */
565 if (ka->sa.sa_flags & SA_RESTORER) {
566 DEREF_REG_PR = (unsigned long) ka->sa.sa_restorer | 0x1;
569 * On SH5 all edited pointers are subject to NEFF
571 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
572 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
575 * Different approach on SH5.
576 * . Endianness independent asm code gets placed in entry.S .
577 * This is limited to four ASM instructions corresponding
578 * to two long longs in size.
579 * . err checking is done on the else branch only
580 * . flush_icache_range() is called upon __put_user() only
581 * . all edited pointers are subject to NEFF
582 * . being code, linker turns ShMedia bit on, always
583 * dereference index -1.
585 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01;
586 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
587 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
589 if (__copy_to_user(frame->retcode,
590 (void *)((unsigned long)sa_default_restorer & (~1)), 16) != 0)
593 /* Cohere the trampoline with the I-cache. */
594 flush_cache_sigtramp(DEREF_REG_PR-1);
598 * Set up registers for signal handler.
599 * All edited pointers are subject to NEFF.
601 regs->regs[REG_SP] = (unsigned long) frame;
602 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
603 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
604 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
607 The glibc profiling support for SH-5 needs to be passed a sigcontext
608 so it can retrieve the PC. At some point during 2003 the glibc
609 support was changed to receive the sigcontext through the 2nd
610 argument, but there are still versions of libc.so in use that use
611 the 3rd argument. Until libc.so is stabilised, pass the sigcontext
612 through both 2nd and 3rd arguments.
615 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->sc;
616 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->sc;
618 regs->pc = (unsigned long) ka->sa.sa_handler;
619 regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc;
624 pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
625 signal, current->comm, current->pid, frame,
626 regs->pc >> 32, regs->pc & 0xffffffff,
627 DEREF_REG_PR >> 32, DEREF_REG_PR & 0xffffffff);
632 force_sigsegv(sig, current);
636 static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
637 sigset_t *set, struct pt_regs *regs)
639 struct rt_sigframe __user *frame;
643 frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame));
645 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
648 signal = current_thread_info()->exec_domain
649 && current_thread_info()->exec_domain->signal_invmap
651 ? current_thread_info()->exec_domain->signal_invmap[sig]
654 err |= __put_user(&frame->info, &frame->pinfo);
655 err |= __put_user(&frame->uc, &frame->puc);
656 err |= copy_siginfo_to_user(&frame->info, info);
658 /* Give up earlier as i386, in case */
662 /* Create the ucontext. */
663 err |= __put_user(0, &frame->uc.uc_flags);
664 err |= __put_user(0, &frame->uc.uc_link);
665 err |= __put_user((void *)current->sas_ss_sp,
666 &frame->uc.uc_stack.ss_sp);
667 err |= __put_user(sas_ss_flags(regs->regs[REG_SP]),
668 &frame->uc.uc_stack.ss_flags);
669 err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
670 err |= setup_sigcontext(&frame->uc.uc_mcontext,
672 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
674 /* Give up earlier as i386, in case */
678 /* Set up to return from userspace. If provided, use a stub
679 already in userspace. */
680 if (ka->sa.sa_flags & SA_RESTORER) {
681 DEREF_REG_PR = (unsigned long) ka->sa.sa_restorer | 0x1;
684 * On SH5 all edited pointers are subject to NEFF
686 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
687 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
690 * Different approach on SH5.
691 * . Endianness independent asm code gets placed in entry.S .
692 * This is limited to four ASM instructions corresponding
693 * to two long longs in size.
694 * . err checking is done on the else branch only
695 * . flush_icache_range() is called upon __put_user() only
696 * . all edited pointers are subject to NEFF
697 * . being code, linker turns ShMedia bit on, always
698 * dereference index -1.
701 DEREF_REG_PR = (unsigned long) frame->retcode | 0x01;
702 DEREF_REG_PR = (DEREF_REG_PR & NEFF_SIGN) ?
703 (DEREF_REG_PR | NEFF_MASK) : DEREF_REG_PR;
705 if (__copy_to_user(frame->retcode,
706 (void *)((unsigned long)sa_default_rt_restorer & (~1)), 16) != 0)
709 flush_icache_range(DEREF_REG_PR-1, DEREF_REG_PR-1+15);
713 * Set up registers for signal handler.
714 * All edited pointers are subject to NEFF.
716 regs->regs[REG_SP] = (unsigned long) frame;
717 regs->regs[REG_SP] = (regs->regs[REG_SP] & NEFF_SIGN) ?
718 (regs->regs[REG_SP] | NEFF_MASK) : regs->regs[REG_SP];
719 regs->regs[REG_ARG1] = signal; /* Arg for signal handler */
720 regs->regs[REG_ARG2] = (unsigned long long)(unsigned long)(signed long)&frame->info;
721 regs->regs[REG_ARG3] = (unsigned long long)(unsigned long)(signed long)&frame->uc.uc_mcontext;
722 regs->pc = (unsigned long) ka->sa.sa_handler;
723 regs->pc = (regs->pc & NEFF_SIGN) ? (regs->pc | NEFF_MASK) : regs->pc;
727 pr_debug("SIG deliver (#%d,%s:%d): sp=%p pc=%08Lx%08Lx link=%08Lx%08Lx\n",
728 signal, current->comm, current->pid, frame,
729 regs->pc >> 32, regs->pc & 0xffffffff,
730 DEREF_REG_PR >> 32, DEREF_REG_PR & 0xffffffff);
735 force_sigsegv(sig, current);
740 * OK, we're invoking a handler
743 handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
744 sigset_t *oldset, struct pt_regs * regs)
748 /* Set up the stack frame */
749 if (ka->sa.sa_flags & SA_SIGINFO)
750 ret = setup_rt_frame(sig, ka, info, oldset, regs);
752 ret = setup_frame(sig, ka, oldset, regs);
754 if (ka->sa.sa_flags & SA_ONESHOT)
755 ka->sa.sa_handler = SIG_DFL;
758 spin_lock_irq(¤t->sighand->siglock);
759 sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
760 if (!(ka->sa.sa_flags & SA_NODEFER))
761 sigaddset(¤t->blocked,sig);
763 spin_unlock_irq(¤t->sighand->siglock);
769 asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
771 if (thread_info_flags & _TIF_SIGPENDING)
774 if (thread_info_flags & _TIF_NOTIFY_RESUME) {
775 clear_thread_flag(TIF_NOTIFY_RESUME);
776 tracehook_notify_resume(regs);