Re: [PATCH] powerpc/pkeys: preallocate execute_only key only if the key is available.

2018-06-20 Thread Ram Pai
On Tue, Jun 19, 2018 at 10:34:22PM -0700, Ram Pai wrote: > Key 2 is preallocated and reserved for execute-only key. In rare > cases if key-2 is unavailable, mprotect(PROT_EXEC) will behave > incorrectly. NOTE: mprotect(PROT_EXEC) uses execute-only key. > > Ensure key 2 is available for preallocati

[PATCH] powerpc/pkeys: preallocate execute_only key only if the key is available.

2018-06-19 Thread Ram Pai
Key 2 is preallocated and reserved for execute-only key. In rare cases if key-2 is unavailable, mprotect(PROT_EXEC) will behave incorrectly. NOTE: mprotect(PROT_EXEC) uses execute-only key. Ensure key 2 is available for preallocation before reserving it for execute_only purpose. CC: Michael Eller