Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5db26e89 authored by Ram Pai's avatar Ram Pai Committed by Michael Ellerman
Browse files

selftests/powerpc: Fix core-pkey for default execute permission change



Only when the key is allocated, its permission are enabled.

Reviewed-by: default avatarThiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: default avatarRam Pai <linuxram@us.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 07f522d2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);