21 #include <linux/sched.h>
24 #include <linux/kernel.h>
25 #include <linux/signal.h>
26 #include <linux/errno.h>
27 #include <linux/wait.h>
28 #include <linux/ptrace.h>
30 #include <linux/stddef.h>
31 #include <linux/personality.h>
33 #include <linux/linkage.h>
35 #include <asm/entry.h>
36 #include <asm/ucontext.h>
38 #include <asm/pgtable.h>
39 #include <asm/pgalloc.h>
41 #include <asm/cacheflush.h>
42 #include <asm/syscalls.h>
63 unsigned long tramp[2];
71 #define COPY(x) {err |= __get_user(regs->x, &sc->regs.x); }
109 if (restore_sigcontext(regs, &frame->
uc.uc_mcontext, &rval))
134 #define COPY(x) {err |= __put_user(regs->x, &sc->regs.x); }
156 static inline void __user *
160 unsigned long sp = regs->
r1;
162 if ((ka->
sa.sa_flags &
SA_ONSTACK) != 0 && !on_sig_stack(sp))
165 return (
void __user *)((sp - frame_size) & -8
UL);
180 frame = get_sigframe(ka, regs,
sizeof(*frame));
198 &frame->
uc.uc_stack.ss_sp);
200 &frame->
uc.uc_stack.ss_flags);
202 err |= setup_sigcontext(&frame->
uc.uc_mcontext,
246 regs->
r1 = (
unsigned long) frame;
251 regs->
r7 = (
unsigned long) &frame->
uc;
253 regs->
pc = (
unsigned long)ka->
sa.sa_handler;
299 handle_signal(
unsigned long sig,
struct k_sigaction *ka,
302 sigset_t *oldset = sigmask_to_save();
307 ret = setup_rt_frame(sig, ka, info, oldset, regs);
309 ret = setup_rt_frame(sig, ka,
NULL, oldset, regs);
342 handle_restart(regs, &ka, 1);
343 handle_signal(signr, &ka, &info, regs);
348 handle_restart(regs,
NULL, 0);
354 restore_saved_sigmask();
365 if (kernel_mode(regs))
372 tracehook_notify_resume(regs);