mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
MFi386: revision 237445
Commit changes missed from r237435. Properly calculate the signal trampoline addresses after the shared page is enabled. Handle FreeBSD ABIs without shared page support too. MFi386: revision 238792 Introduce curpcb magic variable.
This commit is contained in:
parent
a112b2d0e4
commit
47c6c015ff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240855
@ -407,7 +407,13 @@ osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
}
|
||||
|
||||
regs->tf_esp = (int)fp;
|
||||
regs->tf_eip = PS_STRINGS - szosigcode;
|
||||
if (p->p_sysent->sv_sigcode_base != 0) {
|
||||
regs->tf_eip = p->p_sysent->sv_sigcode_base + szsigcode -
|
||||
szosigcode;
|
||||
} else {
|
||||
/* a.out sysentvec does not use shared page */
|
||||
regs->tf_eip = p->p_sysent->sv_psstrings - szosigcode;
|
||||
}
|
||||
regs->tf_eflags &= ~(PSL_T | PSL_D);
|
||||
regs->tf_cs = _ucodesel;
|
||||
regs->tf_ds = _udatasel;
|
||||
@ -534,7 +540,8 @@ freebsd4_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
}
|
||||
|
||||
regs->tf_esp = (int)sfp;
|
||||
regs->tf_eip = PS_STRINGS - szfreebsd4_sigcode;
|
||||
regs->tf_eip = p->p_sysent->sv_sigcode_base + szsigcode -
|
||||
szfreebsd4_sigcode;
|
||||
regs->tf_eflags &= ~(PSL_T | PSL_D);
|
||||
regs->tf_cs = _ucodesel;
|
||||
regs->tf_ds = _udatasel;
|
||||
@ -685,7 +692,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
}
|
||||
|
||||
regs->tf_esp = (int)sfp;
|
||||
regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode);
|
||||
regs->tf_eip = p->p_sysent->sv_sigcode_base;
|
||||
regs->tf_eflags &= ~(PSL_T | PSL_D);
|
||||
regs->tf_cs = _ucodesel;
|
||||
regs->tf_ds = _udatasel;
|
||||
@ -1412,7 +1419,7 @@ exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
|
||||
pcb->pcb_dr3 = 0;
|
||||
pcb->pcb_dr6 = 0;
|
||||
pcb->pcb_dr7 = 0;
|
||||
if (pcb == PCPU_GET(curpcb)) {
|
||||
if (pcb == curpcb) {
|
||||
/*
|
||||
* Clear the debug registers on the running
|
||||
* CPU, otherwise they will end up affecting
|
||||
|
Loading…
Reference in New Issue
Block a user