Home
last modified time | relevance | path

Searched refs:ksig (Results 1 – 25 of 41) sorted by relevance

12

/arch/um/kernel/
Dsignal.c49 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/x86/kernel/
Dsignal.c321 __setup_frame(int sig, struct ksignal *ksig, sigset_t *set, in __setup_frame() argument
328 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fp); in __setup_frame()
341 if (ksig->ka.sa.sa_flags & SA_RESTORER) in __setup_frame()
342 restorer = ksig->ka.sa.sa_restorer; in __setup_frame()
359 regs->ip = (unsigned long)ksig->ka.sa.sa_handler; in __setup_frame()
376 static int __setup_rt_frame(int sig, struct ksignal *ksig, in __setup_rt_frame() argument
383 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fp); in __setup_rt_frame()
403 if (ksig->ka.sa.sa_flags & SA_RESTORER) in __setup_rt_frame()
404 restorer = ksig->ka.sa.sa_restorer; in __setup_rt_frame()
419 if (copy_siginfo_to_user(&frame->info, &ksig->info)) in __setup_rt_frame()
[all …]
/arch/csky/kernel/
Dsignal.c113 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument
128 sp = sigsp(sp, ksig) - framesize; in get_sigframe()
137 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_rt_frame() argument
143 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame()
147 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame()
168 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame()
170 regs->a0 = ksig->sig; /* a0: signal number */ in setup_rt_frame()
177 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument
182 rseq_signal_deliver(ksig, regs); in handle_signal()
197 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal()
[all …]
/arch/h8300/kernel/
Dsignal.c153 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size) in get_sigframe() argument
155 return (void __user *)((sigsp(rdusp(), ksig) - frame_size) & -8UL); in get_sigframe()
158 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument
165 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame()
170 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame()
171 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame()
184 if (ksig->ka.sa.sa_flags & SA_RESTORER) in setup_rt_frame()
185 ret = (unsigned char *)(ksig->ka.sa.sa_restorer); in setup_rt_frame()
200 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame()
201 regs->er0 = ksig->sig; in setup_rt_frame()
[all …]
/arch/openrisc/kernel/
Dsignal.c131 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/riscv/kernel/
Dsignal.c154 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument
169 sp = sigsp(sp, ksig) - framesize; in get_sigframe()
177 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument
184 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame()
188 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame()
226 regs->epc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame()
228 regs->a0 = ksig->sig; /* a0: signal number */ in setup_rt_frame()
234 current->comm, task_pid_nr(current), ksig->sig, in setup_rt_frame()
241 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument
258 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal()
[all …]
/arch/sh/kernel/
Dsignal_32.c269 static int setup_frame(struct ksignal *ksig, sigset_t *set, in setup_frame() argument
273 int err = 0, sig = ksig->sig; in setup_frame()
275 frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame)); in setup_frame()
288 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_frame()
289 regs->pr = (unsigned long) ksig->ka.sa.sa_restorer; in setup_frame()
319 (struct fdpic_func_descriptor __user *)ksig->ka.sa.sa_handler; in setup_frame()
324 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_frame()
335 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument
339 int err = 0, sig = ksig->sig; in setup_rt_frame()
341 frame = get_sigframe(&ksig->ka, regs->regs[15], sizeof(*frame)); in setup_rt_frame()
[all …]
/arch/arm/kernel/
Dsignal.c342 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/powerpc/kernel/
Dsignal.h13 extern void __user *get_sigframe(struct ksignal *ksig, unsigned long sp,
16 extern int handle_signal32(struct ksignal *ksig, sigset_t *oldset,
19 extern int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
45 extern int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
53 static inline int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, in handle_rt_signal64() argument
Dsignal.c177 void __user *get_sigframe(struct ksignal *ksig, unsigned long sp, in get_sigframe() argument
184 oldsp = sigsp(oldsp, ksig); in get_sigframe()
262 struct ksignal ksig = { .sig = 0 }; in do_signal() local
267 get_signal(&ksig); in do_signal()
270 check_syscall_restart(tsk->thread.regs, &ksig.ka, ksig.sig > 0); in do_signal()
272 if (ksig.sig <= 0) { in do_signal()
296 rseq_signal_deliver(&ksig, tsk->thread.regs); in do_signal()
299 if (ksig.ka.sa.sa_flags & SA_SIGINFO) in do_signal()
300 ret = handle_rt_signal32(&ksig, oldset, tsk); in do_signal()
302 ret = handle_signal32(&ksig, oldset, tsk); in do_signal()
[all …]
/arch/microblaze/kernel/
Dsignal.c146 get_sigframe(struct ksignal *ksig, struct pt_regs *regs, size_t frame_size) in get_sigframe() argument
149 unsigned long sp = sigsp(regs->r1, ksig); in get_sigframe()
154 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument
158 int err = 0, sig = ksig->sig; in setup_rt_frame()
165 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame()
170 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame()
171 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame()
226 regs->pc = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame()
266 handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument
272 ret = setup_rt_frame(ksig, oldset, regs); in handle_signal()
[all …]
/arch/hexagon/kernel/
Dsignal.c28 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/
Dsignal_32.c200 static inline void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long f… in get_sigframe() argument
212 sp = sigsp(sp, ksig) - framesize; in get_sigframe()
225 static int setup_frame(struct ksignal *ksig, struct pt_regs *regs, in setup_frame() argument
244 get_sigframe(ksig, regs, sigframe_size); in setup_frame()
292 regs->u_regs[UREG_I0] = ksig->sig; in setup_frame()
297 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; in setup_frame()
301 if (ksig->ka.ka_restorer) in setup_frame()
302 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; in setup_frame()
320 static int setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs, in setup_rt_frame() argument
337 get_sigframe(ksig, regs, sigframe_size); in setup_rt_frame()
[all …]
Dsignal32.c261 static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, unsigned long framesiz… in get_sigframe() argument
276 sp = sigsp(sp, ksig) - framesize; in get_sigframe()
351 static int setup_frame32(struct ksignal *ksig, struct pt_regs *regs, in setup_frame32() argument
374 get_sigframe(ksig, regs, sigframe_size); in setup_frame32()
381 force_sigsegv(ksig->sig); in setup_frame32()
457 regs->u_regs[UREG_I0] = ksig->sig; in setup_frame32()
462 regs->tpc = (unsigned long) ksig->ka.sa.sa_handler; in setup_frame32()
470 if (ksig->ka.ka_restorer) { in setup_frame32()
471 regs->u_regs[UREG_I7] = (unsigned long)ksig->ka.ka_restorer; in setup_frame32()
486 static int setup_rt_frame32(struct ksignal *ksig, struct pt_regs *regs, in setup_rt_frame32() argument
[all …]
/arch/nios2/kernel/
Dsignal.c166 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument
176 usp = sigsp(usp, ksig); in get_sigframe()
182 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument
188 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame()
190 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame()
191 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame()
209 regs->r4 = (unsigned long) ksig->sig; in setup_rt_frame()
212 regs->ea = (unsigned long) ksig->ka.sa.sa_handler; in setup_rt_frame()
216 force_sigsegv(ksig->sig); in setup_rt_frame()
223 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument
[all …]
/arch/arc/kernel/
Dsignal.c247 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument
251 unsigned long sp = sigsp(regs->sp, ksig); in get_sigframe()
269 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs) in setup_rt_frame() argument
275 sf = get_sigframe(ksig, regs, sizeof(struct rt_sigframe)); in setup_rt_frame()
294 if (unlikely(ksig->ka.sa.sa_flags & SA_SIGINFO)) { in setup_rt_frame()
295 err |= copy_siginfo_to_user(&sf->info, &ksig->info); in setup_rt_frame()
316 regs->r0 = ksig->sig; in setup_rt_frame()
319 regs->ret = (unsigned long)ksig->ka.sa.sa_handler; in setup_rt_frame()
325 if(!(ksig->ka.sa.sa_flags & SA_RESTORER)) in setup_rt_frame()
328 regs->blink = (unsigned long)ksig->ka.sa.sa_restorer; in setup_rt_frame()
[all …]
/arch/c6x/kernel/
Dsignal.c128 static inline void __user *get_sigframe(struct ksignal *ksig, in get_sigframe() argument
132 unsigned long sp = sigsp(regs->sp, ksig); in get_sigframe()
141 static int setup_rt_frame(struct ksignal *ksig, sigset_t *set, in setup_rt_frame() argument
148 frame = get_sigframe(ksig, regs, sizeof(*frame)); in setup_rt_frame()
155 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame()
193 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; in setup_rt_frame()
196 regs->a4 = ksig->sig; in setup_rt_frame()
236 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs, in handle_signal() argument
251 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal()
264 ret = setup_rt_frame(ksig, sigmask_to_save(), regs); in handle_signal()
[all …]
/arch/s390/kernel/
Dsignal.c369 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 …]
Dcompat_signal.c253 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/
Dia32_signal.c203 static void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs, in get_sigframe() argument
213 if (ksig->ka.sa.sa_flags & SA_ONSTACK) in get_sigframe()
214 sp = sigsp(sp, ksig); in get_sigframe()
217 !(ksig->ka.sa.sa_flags & SA_RESTORER) && in get_sigframe()
218 ksig->ka.sa.sa_restorer) in get_sigframe()
219 sp = (unsigned long) ksig->ka.sa.sa_restorer; in get_sigframe()
234 int ia32_setup_frame(int sig, struct ksignal *ksig, in ia32_setup_frame() argument
252 frame = get_sigframe(ksig, regs, sizeof(*frame), &fp); in ia32_setup_frame()
254 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in ia32_setup_frame()
255 restorer = ksig->ka.sa.sa_restorer; in ia32_setup_frame()
[all …]
/arch/ia64/kernel/
Dsignal.c227 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/
Dsignal.c265 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/
Dsignal.c227 setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs, in setup_rt_frame() argument
247 frame = get_sigframe(&ksig->ka, usp, sizeof(*frame)); in setup_rt_frame()
250 DBG(1,"setup_rt_frame: frame %p info %p\n", frame, ksig->info); in setup_rt_frame()
259 err |= copy_siginfo_to_user32(&compat_frame->info, &ksig->info); in setup_rt_frame()
271 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_rt_frame()
320 haddr = A(ksig->ka.sa.sa_handler); in setup_rt_frame()
392 regs->gr[26] = ksig->sig; /* signal number */ in setup_rt_frame()
424 handle_signal(struct ksignal *ksig, struct pt_regs *regs, int in_syscall) in handle_signal() argument
430 ksig->sig, ksig->ka, ksig->info, oldset, regs); in handle_signal()
433 ret = setup_rt_frame(ksig, oldset, regs, in_syscall); in handle_signal()
[all …]
/arch/arm64/include/asm/
Dsignal32.h57 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
/arch/xtensa/kernel/
Dsignal.c333 static int setup_frame(struct ksignal *ksig, sigset_t *set, in setup_frame() argument
337 int err = 0, sig = ksig->sig; in setup_frame()
343 if ((ksig->ka.sa.sa_flags & SA_ONSTACK) != 0 && sas_ss_flags(sp) == 0) { in setup_frame()
356 if (ksig->ka.sa.sa_flags & SA_SIGINFO) { in setup_frame()
357 err |= copy_siginfo_to_user(&frame->info, &ksig->info); in setup_frame()
368 if (ksig->ka.sa.sa_flags & SA_RESTORER) { in setup_frame()
369 ra = (unsigned long)ksig->ka.sa.sa_restorer; in setup_frame()
390 start_thread(regs, (unsigned long) ksig->ka.sa.sa_handler, in setup_frame()
427 struct ksignal ksig; in do_signal() local
431 if (get_signal(&ksig)) { in do_signal()
[all …]

12