Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

The test case assumes execute-permissions of unallocated keys are
enabled by default, which is incorrect.

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>

authored by

Ram Pai and committed by
Michael Ellerman
29e8131c 5db26e89

+4
+4
tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
··· 104 104 105 105 if (disable_execute) 106 106 info->expected_iamr |= 1ul << pkeyshift(pkey1); 107 + else 108 + info->expected_iamr &= ~(1ul << pkeyshift(pkey1)); 109 + 110 + info->expected_iamr &= ~(1ul << pkeyshift(pkey2) | 1ul << pkeyshift(pkey3)); 107 111 108 112 info->expected_uamor |= 3ul << pkeyshift(pkey1) | 109 113 3ul << pkeyshift(pkey2);