]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit98456adb8eca39d3b9ebe5a0ce63fb2a3a1365b5
treec00a058714c9903a6780917a30a96b01a9eb1980
parenta8f3b51cc065be683a2d2f88a919622e59156a50
selftests/powerpc: Harden test for execute-disabled pkeys

Commit 631a894de8cfd ("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