9 #include <linux/sched.h>
10 #include <linux/kernel.h>
11 #include <linux/signal.h>
12 #include <linux/errno.h>
13 #include <linux/wait.h>
14 #include <linux/ptrace.h>
18 #include <linux/stddef.h>
19 #include <linux/tty.h>
20 #include <linux/binfmts.h>
21 #include <linux/bitops.h>
25 #include <asm/uaccess.h>
26 #include <asm/sigcontext.h>
27 #include <asm/ucontext.h>
34 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
58 const struct osf_sigaction __user *, act,
59 struct osf_sigaction __user *, oact)
71 siginitset(&new_ka.
sa.sa_mask, mask);
90 size_t, sigsetsize,
void __user *, restorer)
121 siginitset(&blocked,
mask);
136 # error "Non SA_SIGINFO frame needs rearranging"
158 #define INSN_MOV_R30_R16 0x47fe0410
159 #define INSN_LDI_R0 0x201f0000
160 #define INSN_CALLSYS 0x00000083
206 for (i = 0; i < 31; i++)
231 if (restore_sigcontext(sc, regs, sw))
241 info.si_addr = (
void __user *) regs->
pc;
265 if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw))
275 info.si_addr = (
void __user *) regs->
pc;
290 static inline void __user *
291 get_sigframe(
struct k_sigaction *ka,
unsigned long sp,
size_t frame_size)
293 if ((ka->
sa.sa_flags &
SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
296 return (
void __user *)((sp - frame_size) & -32ul);
301 unsigned long mask,
unsigned long sp)
306 err |=
__put_user(on_sig_stack((
unsigned long)sc), &sc->sc_onstack);
344 for (i = 0; i < 31; i++)
360 unsigned long oldsp,
r26, err = 0;
364 frame = get_sigframe(ka, oldsp,
sizeof(*frame));
368 err |= setup_sigcontext(&frame->
sc, regs,
set->sig[0], oldsp);
390 regs->
r27 = regs->
pc = (
unsigned long) ka->
sa.sa_handler;
393 regs->
r18 = (
unsigned long) &frame->
sc;
394 wrusp((
unsigned long) frame);
397 printk(
"SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
407 unsigned long oldsp,
r26, err = 0;
411 frame = get_sigframe(ka, oldsp,
sizeof(*frame));
422 err |=
__put_user(sas_ss_flags(oldsp), &frame->
uc.uc_stack.ss_flags);
424 err |= setup_sigcontext(&frame->
uc.uc_mcontext, regs,
448 regs->
r27 = regs->
pc = (
unsigned long) ka->
sa.sa_handler;
450 regs->
r17 = (
unsigned long) &frame->
info;
455 printk(
"SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
470 sigset_t *oldset = sigmask_to_save();
474 ret = setup_rt_frame(sig, ka, info, oldset, regs);
476 ret = setup_frame(sig, ka, oldset, regs);
486 syscall_restart(
unsigned long r0,
unsigned long r19,
523 do_signal(
struct pt_regs *regs,
unsigned long r0,
unsigned long r19)
539 syscall_restart(r0, r19, regs, &ka);
540 handle_signal(signr, &ka, &info, regs);
565 restore_saved_sigmask();
572 unsigned long r0,
unsigned long r19)
580 do_signal(regs, r0, r19);
584 tracehook_notify_resume(regs);