/arch/um/kernel/ |
D | signal.c | 49 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument 69 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal() 82 if ((ksig->ka.sa.sa_flags & SA_ONSTACK) && (sas_ss_flags(sp) == 0)) in handle_signal() 86 if (!(ksig->ka.sa.sa_flags & SA_SIGINFO)) in handle_signal() 87 err = setup_signal_stack_sc(sp, ksig, regs, oldset); in handle_signal() 90 err = setup_signal_stack_si(sp, ksig, regs, oldset); in handle_signal() 92 signal_setup_done(err, ksig, singlestep); in handle_signal() 97 struct ksignal ksig; in do_signal() local 100 while (get_signal(&ksig)) { in do_signal() 103 handle_signal(&ksig, regs); in do_signal()
|
/arch/powerpc/kernel/ |
D | signal.c | 36 void __user *get_sigframe(struct ksignal *ksig, unsigned long sp, in get_sigframe() argument 43 oldsp = sigsp(oldsp, ksig); in get_sigframe() 107 struct ksignal ksig = { .sig = 0 }; in do_signal() local 113 get_signal(&ksig); in do_signal() 116 check_syscall_restart(tsk->thread.regs, &ksig.ka, ksig.sig > 0); in do_signal() 118 if (ksig.sig <= 0) { in do_signal() 137 rseq_signal_deliver(&ksig, tsk->thread.regs); in do_signal() 140 if (ksig.ka.sa.sa_flags & SA_SIGINFO) in do_signal() 141 ret = handle_rt_signal32(&ksig, oldset, tsk); in do_signal() 143 ret = handle_signal32(&ksig, oldset, tsk); in do_signal() [all …]
|
D | signal.h | 15 extern void __user *get_sigframe(struct ksignal *ksig, unsigned long sp, 18 extern int handle_signal32(struct ksignal *ksig, sigset_t *oldset, 21 extern int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset, 47 extern int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, 55 static inline int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, in handle_rt_signal64() argument
|
/arch/x86/kernel/ |
D | signal.c | 312 __setup_frame(int sig, struct ksignal *ksig, sigset_t *set, in __setup_frame() argument 320 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fpstate); in __setup_frame() 342 if (ksig->ka.sa.sa_flags & SA_RESTORER) in __setup_frame() 343 restorer = ksig->ka.sa.sa_restorer; in __setup_frame() 362 regs->ip = (unsigned long)ksig->ka.sa.sa_handler; in __setup_frame() 375 static int __setup_rt_frame(int sig, struct ksignal *ksig, in __setup_rt_frame() argument 383 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fpstate); in __setup_rt_frame() 404 if (ksig->ka.sa.sa_flags & SA_RESTORER) in __setup_rt_frame() 405 restorer = ksig->ka.sa.sa_restorer; in __setup_rt_frame() 418 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in __setup_rt_frame() [all …]
|
/arch/csky/kernel/ |
D | signal.c | 109 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument 124 sp = sigsp(sp, ksig) - framesize; in get_sigframe() 133 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_rt_frame() argument 139 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame() 143 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 164 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame() 166 regs->a0 = ksig->sig; /* a0: signal number */ in setup_rt_frame() 173 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument 191 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal() 204 ret = setup_rt_frame(ksig, oldset, regs); in handle_signal() [all …]
|
/arch/openrisc/kernel/ |
D | signal.c | 131 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument 138 sp = sigsp(sp, ksig); in get_sigframe() 151 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 158 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame() 164 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame() 165 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 193 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; /* what we enter NOW */ in setup_rt_frame() 195 regs->gpr[3] = (unsigned long)ksig->sig; /* arg 1: signo */ in setup_rt_frame() 206 handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument 210 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); in handle_signal() [all …]
|
/arch/h8300/kernel/ |
D | signal.c | 154 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size) in get_sigframe() argument 156 return (void __user *)((sigsp(rdusp(), ksig) - frame_size) & -8UL); in get_sigframe() 159 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 166 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame() 171 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame() 172 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 185 if (ksig->ka.sa.sa_flags & SA_RESTORER) in setup_rt_frame() 186 ret = (unsigned char *)(ksig->ka.sa.sa_restorer); in setup_rt_frame() 201 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame() 202 regs->er0 = ksig->sig; in setup_rt_frame() [all …]
|
/arch/riscv/kernel/ |
D | signal.c | 146 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument 161 sp = sigsp(sp, ksig) - framesize; in get_sigframe() 170 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 176 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame() 180 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 202 regs->sepc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame() 204 regs->a0 = ksig->sig; /* a0: signal number */ in setup_rt_frame() 210 current->comm, task_pid_nr(current), ksig->sig, in setup_rt_frame() 217 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument 235 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal() [all …]
|
/arch/arm/kernel/ |
D | signal.c | 342 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, int framesize) in get_sigframe() argument 344 unsigned long sp = sigsp(regs->ARM_sp, ksig); in get_sigframe() 362 setup_return(struct pt_regs *regs, struct ksignal *ksig, in setup_return() argument 365 unsigned long handler = (unsigned long)ksig->ka.sa.sa_handler; in setup_return() 386 if (ksig->ka.sa.sa_flags & SA_THIRTYTWO) in setup_return() 417 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_return() 418 retcode = (unsigned long)ksig->ka.sa.sa_restorer; in setup_return() 428 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_return() 439 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_return() 476 regs->ARM_r0 = ksig->sig; in setup_return() [all …]
|
/arch/arc/kernel/ |
D | signal.c | 204 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument 208 unsigned long sp = sigsp(regs->sp, ksig); in get_sigframe() 226 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_rt_frame() argument 232 sf = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); in setup_rt_frame() 251 if (unlikely(ksig->ka.sa.sa_flags & SA_SIGINFO)) { in setup_rt_frame() 252 err |= copy_siginfo_to_user(&sf->info, &ksig->info); in setup_rt_frame() 273 regs->r0 = ksig->sig; in setup_rt_frame() 276 regs->ret = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame() 282 if(!(ksig->ka.sa.sa_flags & SA_RESTORER)) in setup_rt_frame() 285 regs->blink = (unsigned long)ksig->ka.sa.sa_restorer; in setup_rt_frame() [all …]
|
/arch/sh/kernel/ |
D | signal_32.c | 267 static int setup_frame(struct ksignal *ksig, sigset_t *set, in setup_frame() argument 271 int err = 0, sig = ksig->sig; in setup_frame() 273 frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame)); in setup_frame() 286 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_frame() 287 regs->pr = (unsigned long) ksig->ka.sa.sa_restorer; in setup_frame() 317 (struct fdpic_func_descriptor __user *)ksig->ka.sa.sa_handler; in setup_frame() 322 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_frame() 333 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 337 int err = 0, sig = ksig->sig; in setup_rt_frame() 339 frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame)); in setup_rt_frame() [all …]
|
D | signal_64.c | 41 handle_signal(struct ksignal *ksig, struct pt_regs *regs); 81 struct ksignal ksig; in do_signal() local 92 if (get_signal(&ksig)) { in do_signal() 93 handle_syscall_restart(regs, &ksig.ka.sa); in do_signal() 96 handle_signal(&ksig, regs); in do_signal() 374 static int setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_frame() argument 377 int err = 0, sig = ksig->sig; in setup_frame() 380 frame = get_sigframe(&ksig->ka, regs->regs[REG_SP], sizeof(*frame)); in setup_frame() 401 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_frame() 406 ksig->ka->sa.sa_restorer | 0x1); in setup_frame() [all …]
|
/arch/microblaze/kernel/ |
D | signal.c | 148 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size) in get_sigframe() argument 151 unsigned long sp = sigsp(regs->r1, ksig); in get_sigframe() 156 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 160 int err = 0, sig = ksig->sig; in setup_rt_frame() 167 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame() 172 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame() 173 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 230 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame() 270 handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument 276 ret = setup_rt_frame(ksig, oldset, regs); in handle_signal() [all …]
|
/arch/hexagon/kernel/ |
D | signal.c | 28 static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, in get_sigframe() argument 31 unsigned long sp = sigsp(regs->r29, ksig); in get_sigframe() 96 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 103 frame = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); in setup_rt_frame() 108 if (copy_siginfo_to_user(&frame->info, &ksig->info)) in setup_rt_frame() 125 | (unsigned long long)ksig->sig; in setup_rt_frame() 129 pt_set_elr(regs, (unsigned long)ksig->ka.sa.sa_handler); in setup_rt_frame() 137 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument 154 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal() 174 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); in handle_signal() [all …]
|
/arch/sparc/kernel/ |
D | signal_32.c | 202 static inline void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long f… in get_sigframe() argument 214 sp = sigsp(sp, ksig) - framesize; in get_sigframe() 227 static int setup_frame(struct ksignal *ksig, struct pt_regs *regs, in setup_frame() argument 246 get_sigframe(ksig, regs, sigframe_size); in setup_frame() 294 regs->u_regs[UREG_I0] = ksig->sig; in setup_frame() 299 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; in setup_frame() 303 if (ksig->ka.ka_restorer) in setup_frame() 304 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; in setup_frame() 322 static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs, in setup_rt_frame() argument 339 get_sigframe(ksig, regs, sigframe_size); in setup_rt_frame() [all …]
|
D | signal32.c | 262 static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesiz… in get_sigframe() argument 277 sp = sigsp(sp, ksig) - framesize; in get_sigframe() 348 static int setup_frame32(struct ksignal *ksig, struct pt_regs *regs, in setup_frame32() argument 371 get_sigframe(ksig, regs, sigframe_size); in setup_frame32() 378 force_sigsegv(ksig->sig); in setup_frame32() 454 regs->u_regs[UREG_I0] = ksig->sig; in setup_frame32() 459 regs->tpc = (unsigned long) ksig->ka.sa.sa_handler; in setup_frame32() 467 if (ksig->ka.ka_restorer) { in setup_frame32() 468 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; in setup_frame32() 483 static int setup_rt_frame32(struct ksignal *ksig, struct pt_regs *regs, in setup_rt_frame32() argument [all …]
|
/arch/nios2/kernel/ |
D | signal.c | 165 static inline void *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, in get_sigframe() argument 174 usp = sigsp(usp, ksig); in get_sigframe() 180 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 186 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame() 188 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame() 189 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 207 regs->r4 = (unsigned long) ksig->sig; in setup_rt_frame() 210 regs->ea = (unsigned long) ksig->ka.sa.sa_handler; in setup_rt_frame() 214 force_sigsegv(ksig->sig); in setup_rt_frame() 221 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument [all …]
|
/arch/c6x/kernel/ |
D | signal.c | 127 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument 131 unsigned long sp = sigsp(regs->sp, ksig); in get_sigframe() 140 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 147 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame() 154 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 192 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; in setup_rt_frame() 195 regs->a4 = ksig->sig; in setup_rt_frame() 235 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs, in handle_signal() argument 250 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal() 263 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); in handle_signal() [all …]
|
/arch/s390/kernel/ |
D | signal.c | 369 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument 388 frame = get_sigframe(&ksig->ka, regs, frame_size); in setup_rt_frame() 398 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_rt_frame() 399 restorer = (unsigned long) ksig->ka.sa.sa_restorer; in setup_rt_frame() 408 if (copy_siginfo_to_user(&frame->info, &ksig->info)) in setup_rt_frame() 430 regs->psw.addr = (unsigned long) ksig->ka.sa.sa_handler; in setup_rt_frame() 432 regs->gprs[2] = ksig->sig; in setup_rt_frame() 439 static void handle_signal(struct ksignal *ksig, sigset_t *oldset, in handle_signal() argument 445 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in handle_signal() 446 ret = setup_rt_frame(ksig, oldset, regs); in handle_signal() [all …]
|
D | compat_signal.c | 253 static int setup_frame32(struct ksignal *ksig, sigset_t *set, in setup_frame32() argument 256 int sig = ksig->sig; in setup_frame32() 270 frame = get_sigframe(&ksig->ka, regs, frame_size); in setup_frame32() 302 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_frame32() 304 ksig->ka.sa.sa_restorer | PSW32_ADDR_AMODE; in setup_frame32() 320 regs->psw.addr = (__force __u64) ksig->ka.sa.sa_handler; in setup_frame32() 338 static int setup_rt_frame32(struct ksignal *ksig, sigset_t *set, in setup_rt_frame32() argument 359 frame = get_sigframe(&ksig->ka, regs, frame_size); in setup_rt_frame32() 369 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_rt_frame32() 371 ksig->ka.sa.sa_restorer | PSW32_ADDR_AMODE; in setup_rt_frame32() [all …]
|
/arch/x86/ia32/ |
D | ia32_signal.c | 221 static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, in get_sigframe() argument 231 if (ksig->ka.sa.sa_flags & SA_ONSTACK) in get_sigframe() 232 sp = sigsp(sp, ksig); in get_sigframe() 235 !(ksig->ka.sa.sa_flags & SA_RESTORER) && in get_sigframe() 236 ksig->ka.sa.sa_restorer) in get_sigframe() 237 sp = (unsigned long) ksig->ka.sa.sa_restorer; in get_sigframe() 252 int ia32_setup_frame(int sig, struct ksignal *ksig, in ia32_setup_frame() argument 271 frame = get_sigframe(ksig, regs, sizeof(*frame), &fpstate); in ia32_setup_frame() 288 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in ia32_setup_frame() 289 restorer = ksig->ka.sa.sa_restorer; in ia32_setup_frame() [all …]
|
/arch/ia64/kernel/ |
D | signal.c | 227 setup_frame(struct ksignal *ksig, sigset_t *set, struct sigscratch *scr) in setup_frame() argument 236 if (ksig->ka.sa.sa_flags & SA_ONSTACK) { in setup_frame() 260 force_sigsegv(ksig->sig); in setup_frame() 268 force_sigsegv(ksig->sig); in setup_frame() 272 err = __put_user(ksig->sig, &frame->arg0); in setup_frame() 277 err |= __put_user(ksig->ka.sa.sa_handler, &frame->handler); in setup_frame() 279 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_frame() 285 force_sigsegv(ksig->sig); in setup_frame() 312 current->comm, current->pid, ksig->sig, scr->pt.r12, frame->sc.sc_ip, frame->handler); in setup_frame() 318 handle_signal (struct ksignal *ksig, struct sigscratch *scr) in handle_signal() argument [all …]
|
/arch/alpha/kernel/ |
D | signal.c | 265 get_sigframe(struct ksignal *ksig, unsigned long sp, size_t frame_size) in get_sigframe() argument 267 return (void __user *)((sigsp(sp, ksig) - frame_size) & -32ul); in get_sigframe() 328 setup_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_frame() argument 334 frame = get_sigframe(ksig, oldsp, sizeof(*frame)); in setup_frame() 344 r26 = (unsigned long) ksig->ka.ka_restorer; in setup_frame() 359 regs->r27 = regs->pc = (unsigned long) ksig->ka.sa.sa_handler; in setup_frame() 360 regs->r16 = ksig->sig; /* a0: signal number */ in setup_frame() 373 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_rt_frame() argument 379 frame = get_sigframe(ksig, oldsp, sizeof(*frame)); in setup_rt_frame() 383 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() [all …]
|
/arch/parisc/kernel/ |
D | signal.c | 228 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs, in setup_rt_frame() argument 242 frame = get_sigframe(&ksig->ka, usp, sizeof(*frame)); in setup_rt_frame() 245 DBG(1,"setup_rt_frame: frame %p info %p\n", frame, ksig->info); in setup_rt_frame() 254 err |= copy_siginfo_to_user32(&compat_frame->info, &ksig->info); in setup_rt_frame() 266 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame() 315 haddr = A(ksig->ka.sa.sa_handler); in setup_rt_frame() 387 regs->gr[26] = ksig->sig; /* signal number */ in setup_rt_frame() 419 handle_signal(struct ksignal *ksig, struct pt_regs *regs, int in_syscall) in handle_signal() argument 425 ksig->sig, ksig->ka, ksig->info, oldset, regs); in handle_signal() 428 ret = setup_rt_frame(ksig, oldset, regs, in_syscall); in handle_signal() [all …]
|
/arch/arm64/include/asm/ |
D | signal32.h | 57 int compat_setup_frame(int usig, struct ksignal *ksig, sigset_t *set, 59 int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set, 65 static inline int compat_setup_frame(int usid, struct ksignal *ksig, in compat_setup_frame() argument 71 static inline int compat_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set, in compat_setup_rt_frame() argument
|