[PATCH] selftests/mm: fix dependency on pkey_util.c
Kevin Brodsky
kevin.brodsky at arm.com
Mon Dec 16 01:28:49 PST 2024
The pkey* files can only be built on architectures that support
pkeys (pkey-helpers.h #error's otherwise). Adding pkey_util.c as
dependency to all $(TEST_GEN_FILES) is therefore a bad idea. Make it
a dependency of the pkeys tests only.
Those tests are built in 32/64-bit variants on x86_64 so we need to
add an explicit dependency there as well.
Signed-off-by: Kevin Brodsky <kevin.brodsky at arm.com>
---
Hi Alexander,
Thank you for the bug report, that patch indeed breaks all
architectures that don't support pkeys, I should have realised that!
This patch should fix it.
Andrew, it would make sense to squash this patch into the original
("selftests/mm: Use sys_pkey helpers consistently").
Cheers,
- Kevin
Cc: akpm at linux-foundation.org
Cc: aruna.ramakrishna at oracle.com
Cc: catalin.marinas at arm.com
Cc: dave.hansen at linux.intel.com
Cc: joey.gouly at arm.com
Cc: keith.lucas at oracle.com
Cc: ryan.roberts at arm.com
Cc: shuah at kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kselftest at vger.kernel.org
Cc: linux-mm at kvack.org
Cc: x86 at kernel.org
Cc: linux-s390 at vger.kernel.org
---
tools/testing/selftests/mm/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
index 1f0743d9459d..18041de1aebf 100644
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@ -147,16 +147,20 @@ TEST_FILES += write_hugetlb_memory.sh
include ../lib.mk
-$(TEST_GEN_PROGS): vm_util.c thp_settings.c pkey_util.c
-$(TEST_GEN_FILES): vm_util.c thp_settings.c pkey_util.c
+$(TEST_GEN_PROGS): vm_util.c thp_settings.c
+$(TEST_GEN_FILES): vm_util.c thp_settings.c
$(OUTPUT)/uffd-stress: uffd-common.c
$(OUTPUT)/uffd-unit-tests: uffd-common.c
+$(OUTPUT)/protection_keys: pkey_util.c
+$(OUTPUT)/pkey_sighandler_tests: pkey_util.c
ifeq ($(ARCH),x86_64)
BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
BINARIES_64 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_64))
+$(BINARIES_32) $(BINARIES_64): pkey_util.c
+
define gen-target-rule-32
$(1) $(1)_32: $(OUTPUT)/$(1)_32
.PHONY: $(1) $(1)_32
--
2.47.0
More information about the linux-arm-kernel
mailing list