Thread (3 messages) 3 messages, 2 authors, 2017-11-09

Re: [PATCH v9 00/51] powerpc, mm: Memory Protection Keys

From: Ram Pai <hidden>
Date: 2017-11-09 22:23:43
Also in: linux-arch, linux-kselftest, linux-mm, lkml

On Mon, Nov 06, 2017 at 05:22:18PM -0800, Ram Pai wrote:
On Mon, Nov 06, 2017 at 10:28:41PM +0100, Florian Weimer wrote:
quoted
* Ram Pai:
quoted
Testing:
-------
This patch series has passed all the protection key
tests available in the selftest directory.The
tests are updated to work on both x86 and powerpc.
The selftests have passed on x86 and powerpc hardware.
....snip....
quoted
What about siglongjmp from a signal handler?
On powerpc there is some relief.  the permissions on a key can be
modified from anywhere, including from the signal handler, and the
effect will be immediate.  You dont have to wait till the
signal handler returns for the key permissions to be restore.

also after return from the sigsetjmp();
possibly caused by siglongjmp(), the program can restore the permission
on any key.

Atleast that is my theory. Can you give me a testcase; if you have one
handy.
quoted
  <https://sourceware.org/bugzilla/show_bug.cgi?id=22396>
reading through the bug report, you mention that the following
"The application may not be able to save and restore the protection bits
for all keys because the kernel API does not actually specify that the
set of keys is a small, fixed set."

What exact kernel API do you need? This patch set exposes the total
number of keys and  max keys,  through sysfs.
https://marc.info/?l=linux-kernel&m=150995950219669&w=2

Is this sufficient? or do you need something else?

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