Thread (14 messages) flat view 14 messages, 5 authors, 2018-05-17

Re: [PATCH] pkeys: Introduce PKEY_ALLOC_SIGNALINHERIT and change signal semantics

From: Florian Weimer <hidden>
Date: 2018-05-17 10:09:40
Also in: linux-arch, linux-mm, linuxppc-dev

On 05/16/2018 11:07 PM, Ram Pai wrote:
what would change the key-permission-values enforced in signal-handler
context?  Or can it never be changed, ones set through sys_pkey_alloc()?
The access rights can only be set by pkey_alloc and are unchanged after 
that (so we do not have to discuss whether the signal handler access 
rights are per-thread or not).
I suppose key-permission-values change done in non-signal-handler context,
will not apply to those in signal-handler context.
Correct, that is the plan.
Can the signal handler change the key-permission-values from the
signal-handler context?
Yes, changes are possible.  The access rights given to pkey_alloc only 
specify the initial access rights when the signal handler is entered.

We need to decide if we should restore it on exit from the signal 
handler.  There is also the matter of siglongjmp, which currently does 
not restore the current thread's access rights.  In general, this might 
be difficult to implement because of the limited space in jmp_buf.

Thanks,
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help