Thread (1 message) 1 message, 1 author, 2018-11-08

Re: pkeys: Reserve PKEY_DISABLE_READ

From: Ram Pai <hidden>
Date: 2018-11-08 19:22:39
Also in: linux-mm, linuxppc-dev

On Thu, Nov 08, 2018 at 01:05:09PM +0100, Florian Weimer wrote:
Would it be possible to reserve a bit for PKEY_DISABLE_READ?

I think the POWER implementation can disable read access at the hardware
level, but not write access, and that cannot be expressed with the
current PKEY_DISABLE_ACCESS and PKEY_DISABLE_WRITE bits.
POWER hardware can disable-read and can **also disable-write**
at the hardware level. It can disable-execute aswell at the
hardware level.   For example if the key bits for a given key in the AMR
register is  
	0b01  it is read-disable
	0b10  it is write-disable

To support access-disable, we make the key value 0b11.

So in case if you want to know if the key is read-disable 'bitwise-and' it
against 0x1.  i.e  (x & 0x1)

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