mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00:00
selftests/powerpc: Fix core-pkey for default execute permission change
Only when the key is allocated, its permission are enabled. Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
07f522d203
commit
5db26e8903
1 changed files with 4 additions and 0 deletions
|
@ -140,6 +140,10 @@ static int child(struct shared_info *info)
|
|||
|
||||
if (disable_execute)
|
||||
info->iamr |= 1ul << pkeyshift(pkey1);
|
||||
else
|
||||
info->iamr &= ~(1ul << pkeyshift(pkey1));
|
||||
|
||||
info->iamr &= ~(1ul << pkeyshift(pkey2) | 1ul << pkeyshift(pkey3));
|
||||
|
||||
info->uamor |= 3ul << pkeyshift(pkey1) | 3ul << pkeyshift(pkey2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue