summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/mm/Makefile
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@arm.com>2024-08-22 18:11:09 +0300
committerWill Deacon <will@kernel.org>2024-09-04 14:54:06 +0300
commitf5b5ea51f78f2ebd94d5a77702bbe5eee8924b50 (patch)
treea2c023b2cc3ed42d6ecf9b283bb9757463052832 /tools/testing/selftests/mm/Makefile
parent41bbcf7b4b046b4e7190c1866625aed0fe6f69f6 (diff)
downloadlinux-f5b5ea51f78f2ebd94d5a77702bbe5eee8924b50.tar.xz
selftests: mm: make protection_keys test work on arm64
The encoding of the pkey register differs on arm64, than on x86/ppc. On those platforms, a bit in the register is used to disable permissions, for arm64, a bit enabled in the register indicates that the permission is allowed. This drops two asserts of the form: assert(read_pkey_reg() <= orig_pkey_reg); Because on arm64 this doesn't hold, due to the encoding. The pkey must be reset to both access allow and write allow in the signal handler. pkey_access_allow() works currently for PowerPC as the PKEY_DISABLE_ACCESS and PKEY_DISABLE_WRITE have overlapping bits set. Access to the uc_mcontext is abstracted, as arm64 has a different structure. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/r/20240822151113.1479789-27-joey.gouly@arm.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/testing/selftests/mm/Makefile')
-rw-r--r--tools/testing/selftests/mm/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
index 7b8a5def54a1..b474ac7be8a5 100644
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@ -104,7 +104,7 @@ TEST_GEN_FILES += $(BINARIES_64)
endif
else
-ifneq (,$(findstring $(ARCH),powerpc))
+ifneq (,$(filter $(ARCH),arm64 powerpc))
TEST_GEN_FILES += protection_keys
endif