powerpc/pkeys: Deny read/write/execute by default
authorRam Pai <linuxram@us.ibm.com>
Tue, 17 Jul 2018 13:51:03 +0000 (06:51 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 Jul 2018 11:33:41 +0000 (21:33 +1000)
commitde113256f8c1c24d8c79ae388bf2a5abd70f7577
tree1ee5ff88eddd380bd15ceaa30f41b8843a889b5b
parenta57a04c76e06822e4377831611364c846b7202ca
powerpc/pkeys: Deny read/write/execute by default

Deny all permissions on all keys, with some exceptions. pkey-0 must
allow all permissions, or else everything comes to a screaching halt.
Execute-only key must allow execute permission.

Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem")
Cc: stable@vger.kernel.org # v4.16+
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/pkeys.c