Rework the arm64 sigtramp code to be a trampoline
To help with switching to a vdso sigtramp switch to passing through the sigcode function when entering a signal. This ensures the return address is within the function. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33690
This commit is contained in:
parent
e031614d59
commit
db3a1eec37
@ -624,10 +624,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
tf->tf_x[0] = sig;
|
||||
tf->tf_x[1] = (register_t)&fp->sf_si;
|
||||
tf->tf_x[2] = (register_t)&fp->sf_uc;
|
||||
|
||||
tf->tf_elr = (register_t)catcher;
|
||||
tf->tf_x[8] = (register_t)catcher;
|
||||
tf->tf_sp = (register_t)fp;
|
||||
tf->tf_lr = (register_t)p->p_sysent->sv_sigcode_base;
|
||||
tf->tf_elr = (register_t)p->p_sysent->sv_sigcode_base;
|
||||
|
||||
/* Clear the single step flag while in the signal handler */
|
||||
if ((td->td_pcb->pcb_flags & PCB_SINGLE_STEP) != 0) {
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <machine/asm.h>
|
||||
|
||||
ENTRY(sigcode)
|
||||
blr x8
|
||||
mov x0, sp
|
||||
add x0, x0, #SF_UC
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user