diff options
author | kib <kib@FreeBSD.org> | 2013-11-08 16:57:55 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-11-08 16:57:55 +0000 |
commit | b5c7019b85457b16968be3205d2246ef6ba2d8d6 (patch) | |
tree | d9530b17abd5632de5ae6521a87d147218f80098 | |
parent | 9904afa9b2f94e12059292090eb7243f7d7e67e0 (diff) | |
download | FreeBSD-src-b5c7019b85457b16968be3205d2246ef6ba2d8d6.zip FreeBSD-src-b5c7019b85457b16968be3205d2246ef6ba2d8d6.tar.gz |
Fix signal delivery for the iBCS2 binaries. The iBCS2 sysvec uses
current FreeBSD signal trampoline, but does not specifies
sv_sigcode_base, since shared page is not mapped. This results in the
zero %eip for the signal frame. Fall back to calculating %eip as
offset from the psstrings when sv_sigcode_base is not initialized.
Reported by: Rich Naill <rich@enterprisesystems.net>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
-rw-r--r-- | sys/i386/i386/machdep.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c430316..ad1f0fe 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -757,6 +757,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) regs->tf_esp = (int)sfp; regs->tf_eip = p->p_sysent->sv_sigcode_base; + if (regs->tf_eip == 0) + regs->tf_eip = p->p_sysent->sv_psstrings - szsigcode; regs->tf_eflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; |