Date: Fri, 8 Nov 2013 16:57:56 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257858 - head/sys/i386/i386 Message-ID: <201311081657.rA8Gvup4066307@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Nov 8 16:57:55 2013 New Revision: 257858 URL: http://svnweb.freebsd.org/changeset/base/257858 Log: 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 Modified: head/sys/i386/i386/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Nov 8 16:56:13 2013 (r257857) +++ head/sys/i386/i386/machdep.c Fri Nov 8 16:57:55 2013 (r257858) @@ -757,6 +757,8 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311081657.rA8Gvup4066307>