Thread (16 messages) flat view 16 messages, 3 authors, 2017-12-18

Re: pkeys: Support setting access rights for signal handlers

From: Dave Hansen <hidden>
Date: 2017-12-13 15:22:04
Also in: linux-arch, linux-mm

On 12/13/2017 07:08 AM, Florian Weimer wrote:
Okay, this model is really quite different from x86.  Is there a
good reason for the difference?
Yes, both implementations are simple and take the "natural" behavior.
x86 changes XSAVE-controlled register values on entering a signal, so we
let them be changed (including PKRU).  POWER hardware does not do this
to its PKRU-equivalent, so we do not force it to.

x86 didn't have to do this for *signals*.  But, we kinda went on this
trajectory when we decided to clear/restore FPU state on
entering/exiting signals before XSAVE even existed.

FWIW, I do *not* think we have to do this for future XSAVE states.  But,
if we do that, we probably need an interface for apps to tell us which
states to save/restore and which state to set upon entering a signal
handler.  That's what I was trying to get you to consider instead of
just a one-off hack to fix this for pkeys.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help