Skip to content

Commit

Permalink
selftests/powerpc: Fix ptrace-pkey for default execute permission change
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ram Pai authored and Michael Ellerman committed Jul 24, 2018
1 parent 5db26e8 commit 29e8131
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 29e8131

Please sign in to comment.