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
This commit is contained in:
parent
f2a7dc989c
commit
b65c25f54a
@ -752,6 +752,7 @@ set_mcontext32(struct thread *td, const mcontext32_t *mcp)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user