Date: Fri, 24 Jan 2014 02:57:00 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261095 - head/sys/powerpc/powerpc Message-ID: <201401240257.s0O2v0le099668@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Fri Jan 24 02:57:00 2014 New Revision: 261095 URL: http://svnweb.freebsd.org/changeset/base/261095 Log: Fix 32-bit signal handling on ppc64. This was broken when the PSL_USERSTATIC macro was changed. Since copying 64-bit srr1 into 32-bit srr1 drops the upper 32 bits, any bits set in the context were dropped, meaning the context check fails. Since 32-bit set_context can't change those bits anyway, copy the ones from the current context (td->td_frame) before calling set_context(). MFC after: 3 weeks Modified: head/sys/powerpc/powerpc/exec_machdep.c Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Fri Jan 24 00:42:18 2014 (r261094) +++ head/sys/powerpc/powerpc/exec_machdep.c Fri Jan 24 02:57:00 2014 (r261095) @@ -752,6 +752,7 @@ set_mcontext32(struct thread *td, const memcpy(mcp64.mc_av,mcp->mc_av,sizeof(mcp64.mc_av)); for (i = 0; i < 42; i++) mcp64.mc_frame[i] = mcp->mc_frame[i]; + mcp64.mc_srr1 |= (td->td_frame->srr1 & 0xFFFFFFFF00000000ULL); memcpy(mcp64.mc_fpreg,mcp->mc_fpreg,sizeof(mcp64.mc_fpreg)); error = set_mcontext(td, &mcp64);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401240257.s0O2v0le099668>