Lines Matching refs:ksig

326 __setup_frame(int sig, struct ksignal *ksig, sigset_t *set,  in __setup_frame()  argument
333 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fp); in __setup_frame()
346 if (ksig->ka.sa.sa_flags & SA_RESTORER) in __setup_frame()
347 restorer = ksig->ka.sa.sa_restorer; in __setup_frame()
364 regs->ip = (unsigned long)ksig->ka.sa.sa_handler; in __setup_frame()
381 static int __setup_rt_frame(int sig, struct ksignal *ksig, in __setup_rt_frame() argument
388 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fp); in __setup_rt_frame()
408 if (ksig->ka.sa.sa_flags & SA_RESTORER) in __setup_rt_frame()
409 restorer = ksig->ka.sa.sa_restorer; in __setup_rt_frame()
424 if (copy_siginfo_to_user(&frame->info, &ksig->info)) in __setup_rt_frame()
429 regs->ip = (unsigned long)ksig->ka.sa.sa_handler; in __setup_rt_frame()
460 static int __setup_rt_frame(int sig, struct ksignal *ksig, in __setup_rt_frame() argument
468 if (!(ksig->ka.sa.sa_flags & SA_RESTORER)) in __setup_rt_frame()
471 frame = get_sigframe(&ksig->ka, regs, sizeof(struct rt_sigframe), &fp); in __setup_rt_frame()
484 unsafe_put_user(ksig->ka.sa.sa_restorer, &frame->pretcode, Efault); in __setup_rt_frame()
489 if (ksig->ka.sa.sa_flags & SA_SIGINFO) { in __setup_rt_frame()
490 if (copy_siginfo_to_user(&frame->info, &ksig->info)) in __setup_rt_frame()
503 regs->ip = (unsigned long) ksig->ka.sa.sa_handler; in __setup_rt_frame()
562 static int x32_setup_rt_frame(struct ksignal *ksig, in x32_setup_rt_frame() argument
572 if (!(ksig->ka.sa.sa_flags & SA_RESTORER)) in x32_setup_rt_frame()
575 frame = get_sigframe(&ksig->ka, regs, sizeof(*frame), &fp); in x32_setup_rt_frame()
587 restorer = ksig->ka.sa.sa_restorer; in x32_setup_rt_frame()
593 if (ksig->ka.sa.sa_flags & SA_SIGINFO) { in x32_setup_rt_frame()
594 if (x32_copy_siginfo_to_user(&frame->info, &ksig->info)) in x32_setup_rt_frame()
600 regs->ip = (unsigned long) ksig->ka.sa.sa_handler; in x32_setup_rt_frame()
603 regs->di = ksig->sig; in x32_setup_rt_frame()
745 static inline int is_ia32_compat_frame(struct ksignal *ksig) in is_ia32_compat_frame() argument
748 ksig->ka.sa.sa_flags & SA_IA32_ABI; in is_ia32_compat_frame()
751 static inline int is_ia32_frame(struct ksignal *ksig) in is_ia32_frame() argument
753 return IS_ENABLED(CONFIG_X86_32) || is_ia32_compat_frame(ksig); in is_ia32_frame()
756 static inline int is_x32_frame(struct ksignal *ksig) in is_x32_frame() argument
759 ksig->ka.sa.sa_flags & SA_X32_ABI; in is_x32_frame()
763 setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) in setup_rt_frame() argument
765 int usig = ksig->sig; in setup_rt_frame()
770 rseq_signal_deliver(ksig, regs); in setup_rt_frame()
773 if (is_ia32_frame(ksig)) { in setup_rt_frame()
774 if (ksig->ka.sa.sa_flags & SA_SIGINFO) in setup_rt_frame()
775 return ia32_setup_rt_frame(usig, ksig, cset, regs); in setup_rt_frame()
777 return ia32_setup_frame(usig, ksig, cset, regs); in setup_rt_frame()
778 } else if (is_x32_frame(ksig)) { in setup_rt_frame()
779 return x32_setup_rt_frame(ksig, cset, regs); in setup_rt_frame()
781 return __setup_rt_frame(ksig->sig, ksig, set, regs); in setup_rt_frame()
786 handle_signal(struct ksignal *ksig, struct pt_regs *regs) in handle_signal() argument
804 if (!(ksig->ka.sa.sa_flags & SA_RESTART)) { in handle_signal()
825 failed = (setup_rt_frame(ksig, regs) < 0); in handle_signal()
843 signal_setup_done(failed, ksig, stepping); in handle_signal()
866 struct ksignal ksig; in arch_do_signal_or_restart() local
868 if (has_signal && get_signal(&ksig)) { in arch_do_signal_or_restart()
870 handle_signal(&ksig, regs); in arch_do_signal_or_restart()