summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorKevin Brodsky <kevin.brodsky@arm.com>2024-10-29 17:45:38 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2024-11-04 19:31:25 +0300
commit6e182dc9f2680681ffb0b6d9757927f1bd321b38 (patch)
tree100e788b505662bf02e6eda8bcc3f50a2baba3dc /tools/perf/scripts/python/stackcollapse.py
parent8edbbfcc1ed3ca2170a2c5e888a76ba3652e62c9 (diff)
downloadlinux-6e182dc9f2680681ffb0b6d9757927f1bd321b38.tar.xz
selftests/mm: Use generic pkey register manipulation
pkey_sighandler_tests.c currently hardcodes x86 PKRU encodings. The first step towards running those tests on arm64 is to abstract away the pkey register values. Since those tests want to deny access to all keys except a few, we have each arch define PKEY_REG_ALLOW_NONE, the pkey register value denying access to all keys. We then use the existing set_pkey_bits() helper to grant access to specific keys. Because pkeys may also remove the execute permission on arm64, we need to be a little careful: all code is mapped with pkey 0, and we need it to remain executable. pkey_reg_restrictive_default() is introduced for that purpose: the value it returns prevents RW access to all pkeys, but retains X permission for pkey 0. test_pkru_preserved_after_sigusr1() only checks that the pkey register value remains unchanged after a signal is delivered, so the particular value is irrelevant. We enable pkey 0 and a few more arbitrary keys in the smallest range available on all architectures (8 keys on arm64). Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/r/20241029144539.111155-5-kevin.brodsky@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions