Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/linux/linux_sysvec.c
Show First 20 Lines • Show All 435 Lines • ▼ Show 20 Lines | linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) | ||||
/* Fill in POSIX parts. */ | /* Fill in POSIX parts. */ | ||||
siginfo_to_lsiginfo(&ksi->ksi_info, &frame.sf_si, sig); | siginfo_to_lsiginfo(&ksi->ksi_info, &frame.sf_si, sig); | ||||
/* Build the signal context to be used by sigreturn. */ | /* Build the signal context to be used by sigreturn. */ | ||||
frame.sf_sc.uc_flags = 0; /* XXX ??? */ | frame.sf_sc.uc_flags = 0; /* XXX ??? */ | ||||
frame.sf_sc.uc_link = NULL; /* XXX ??? */ | frame.sf_sc.uc_link = NULL; /* XXX ??? */ | ||||
frame.sf_sc.uc_stack.ss_sp = td->td_sigstk.ss_sp; | frame.sf_sc.uc_stack.ss_sp = PTROUT(td->td_sigstk.ss_sp); | ||||
frame.sf_sc.uc_stack.ss_size = td->td_sigstk.ss_size; | frame.sf_sc.uc_stack.ss_size = td->td_sigstk.ss_size; | ||||
frame.sf_sc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) | frame.sf_sc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) | ||||
? ((oonstack) ? LINUX_SS_ONSTACK : 0) : LINUX_SS_DISABLE; | ? ((oonstack) ? LINUX_SS_ONSTACK : 0) : LINUX_SS_DISABLE; | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
bsd_to_linux_sigset(mask, &frame.sf_sc.uc_sigmask); | bsd_to_linux_sigset(mask, &frame.sf_sc.uc_sigmask); | ||||
frame.sf_sc.uc_mcontext.sc_mask = frame.sf_sc.uc_sigmask.__mask; | frame.sf_sc.uc_mcontext.sc_mask = frame.sf_sc.uc_sigmask.__mask; | ||||
▲ Show 20 Lines • Show All 293 Lines • ▼ Show 20 Lines | #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) | ||||
regs->tf_eip = context->sc_eip; | regs->tf_eip = context->sc_eip; | ||||
regs->tf_cs = context->sc_cs; | regs->tf_cs = context->sc_cs; | ||||
regs->tf_eflags = eflags; | regs->tf_eflags = eflags; | ||||
regs->tf_esp = context->sc_esp_at_signal; | regs->tf_esp = context->sc_esp_at_signal; | ||||
regs->tf_ss = context->sc_ss; | regs->tf_ss = context->sc_ss; | ||||
/* Call sigaltstack & ignore results. */ | /* Call sigaltstack & ignore results. */ | ||||
lss = &uc.uc_stack; | lss = &uc.uc_stack; | ||||
ss.ss_sp = lss->ss_sp; | ss.ss_sp = PTRIN(lss->ss_sp); | ||||
ss.ss_size = lss->ss_size; | ss.ss_size = lss->ss_size; | ||||
ss.ss_flags = linux_to_bsd_sigaltstack(lss->ss_flags); | ss.ss_flags = linux_to_bsd_sigaltstack(lss->ss_flags); | ||||
(void)kern_sigaltstack(td, &ss, NULL); | (void)kern_sigaltstack(td, &ss, NULL); | ||||
return (EJUSTRETURN); | return (EJUSTRETURN); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 419 Lines • Show Last 20 Lines |