OSDN Git Service

selftests/powerpc: Harden test for execute-disabled pkeys
authorSandipan Das <sandipan@linux.ibm.com>
Mon, 27 Jul 2020 04:00:37 +0000 (09:30 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 11:02:10 +0000 (21:02 +1000)
commit03634bbf5d8a6f2d97e6150a1b8ff03675badac3
treec00a058714c9903a6780917a30a96b01a9eb1980
parent264d7fccc4711328a19f07e6bd57aee4c68803aa
selftests/powerpc: Harden test for execute-disabled pkeys

Commit 192b6a7805989 ("powerpc/book3s64/pkeys: Fix
pkey_access_permitted() for execute disable pkey") fixed a
bug that caused repetitive faults for pkeys with no execute
rights alongside some combination of read and write rights.

This removes the last two cases of the test, which check
the behaviour of pkeys with read, write but no execute
rights and all the rights, in favour of checking all the
possible combinations of read, write and execute rights
to be able to detect bugs like the one mentioned above.

Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/db467500f8af47727bba6b35796e8974a78b71e5.1595821792.git.sandipan@linux.ibm.com
tools/testing/selftests/powerpc/mm/pkey_exec_prot.c