diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-07-17 06:51:10 -0700 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-07-24 22:03:14 +1000 |
commit | 29e8131cd77ae49750e7e2f9f596afa5812435f2 (patch) | |
tree | a563df6f31565d7af355be74d8c8a67d0aa00f42 /tools/testing | |
parent | 5db26e8903deb111b303bd6e0cf304215e0b4fd9 (diff) | |
download | linux-stable-29e8131cd77ae49750e7e2f9f596afa5812435f2.tar.gz linux-stable-29e8131cd77ae49750e7e2f9f596afa5812435f2.tar.bz2 linux-stable-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')
-rw-r--r-- | tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c | 4 |
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); |