aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/ptrace
diff options
context:
space:
mode:
authorRam Pai <linuxram@us.ibm.com>2018-07-17 06:51:08 -0700
committerMichael Ellerman <mpe@ellerman.id.au>2018-07-24 21:43:24 +1000
commit07f522d203242b359624a284b61977600eebfd5a (patch)
tree0e6e67f45bd011accab460bdf50b2d188ed786cc /tools/testing/selftests/powerpc/ptrace
parentpowerpc/pkeys: Preallocate execute-only key (diff)
downloadlinux-dev-07f522d203242b359624a284b61977600eebfd5a.tar.xz
linux-dev-07f522d203242b359624a284b61977600eebfd5a.zip
powerpc/pkeys: make protection key 0 less special
Applications need the ability to associate an address-range with some key and latter revert to its initial default key. Pkey-0 comes close to providing this function but falls short, because the current implementation disallows applications to explicitly associate pkey-0 to the address range. Lets make pkey-0 less special and treat it almost like any other key. Thus it can be explicitly associated with any address range, and can be freed. This gives the application more flexibility and power. The ability to free pkey-0 must be used responsibily, since pkey-0 is associated with almost all address-range by default. Even with this change pkey-0 continues to be slightly more special from the following point of view. (a) it is implicitly allocated. (b) it is the default key assigned to any address-range. (c) its permissions cannot be modified by userspace. NOTE: (c) is specific to powerpc only. pkey-0 is associated by default with all pages including kernel pages, and pkeys are also active in kernel mode. If any permission is denied on pkey-0, the kernel running in the context of the application will be unable to operate. Tested on powerpc. Signed-off-by: Ram Pai <linuxram@us.ibm.com> [mpe: Drop #define PKEY_0 0 in favour of plain old 0] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/ptrace')
0 files changed, 0 insertions, 0 deletions