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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.

To unsubscribe from this list: send the line "unsubscribe linux-x86_64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux ia64]     [Linux Kernel]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]
  Powered by Linux