selftests/powerpc: Add a test for execute-only memory
authorNicholas Miehlbradt <nicholas@linux.ibm.com>
Wed, 17 Aug 2022 05:06:40 +0000 (15:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 26 Aug 2022 01:02:21 +0000 (11:02 +1000)
commit98acee3f8db451eaab9fbd422e523c228aacf08c
tree2afb3c1e4a638a518367ac71da2d4d05c562df9f
parent395cac7752b905318ae454a8b859d4c190485510
selftests/powerpc: Add a test for execute-only memory

This selftest is designed to cover execute-only protections
on the Radix MMU but will also work with Hash.

The tests are based on those found in pkey_exec_test with modifications
to use the generic mprotect() instead of the pkey variants.

Signed-off-by: Nicholas Miehlbradt <nicholas@linux.ibm.com>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220817050640.406017-2-ruscur@russell.cc
tools/testing/selftests/powerpc/mm/Makefile
tools/testing/selftests/powerpc/mm/exec_prot.c [new file with mode: 0644]