aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/ptrace
diff options
context:
space:
mode:
authorRam Pai <linuxram@us.ibm.com>2018-07-17 06:51:10 -0700
committerMichael Ellerman <mpe@ellerman.id.au>2018-07-24 22:03:14 +1000
commit29e8131cd77ae49750e7e2f9f596afa5812435f2 (patch)
treea563df6f31565d7af355be74d8c8a67d0aa00f42 /tools/testing/selftests/powerpc/ptrace
parentselftests/powerpc: Fix core-pkey for default execute permission change (diff)
downloadlinux-dev-29e8131cd77ae49750e7e2f9f596afa5812435f2.tar.xz
linux-dev-29e8131cd77ae49750e7e2f9f596afa5812435f2.zip
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>
Diffstat (limited to 'tools/testing/selftests/powerpc/ptrace')
-rw-r--r--tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c b/tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
index 5cf631f792cc..bdbbbe8431e0 100644
--- a/tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
+++ b/tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
@@ -104,6 +104,10 @@ static int child(struct shared_info *info)
if (disable_execute)
info->expected_iamr |= 1ul << pkeyshift(pkey1);
+ else
+ info->expected_iamr &= ~(1ul << pkeyshift(pkey1));
+
+ info->expected_iamr &= ~(1ul << pkeyshift(pkey2) | 1ul << pkeyshift(pkey3));
info->expected_uamor |= 3ul << pkeyshift(pkey1) |
3ul << pkeyshift(pkey2);