[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241216092849.2140850-1-kevin.brodsky@arm.com>
Date: Mon, 16 Dec 2024 09:28:49 +0000
From: Kevin Brodsky <kevin.brodsky@....com>
To: Alexander Gordeev <agordeev@...ux.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org,
Kevin Brodsky <kevin.brodsky@....com>,
aruna.ramakrishna@...cle.com,
catalin.marinas@....com,
dave.hansen@...ux.intel.com,
joey.gouly@....com,
keith.lucas@...cle.com,
ryan.roberts@....com,
shuah@...nel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kselftest@...r.kernel.org,
linux-mm@...ck.org,
x86@...nel.org,
linux-s390@...r.kernel.org
Subject: [PATCH] selftests/mm: fix dependency on pkey_util.c
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@....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@...ux-foundation.org
Cc: aruna.ramakrishna@...cle.com
Cc: catalin.marinas@....com
Cc: dave.hansen@...ux.intel.com
Cc: joey.gouly@....com
Cc: keith.lucas@...cle.com
Cc: ryan.roberts@....com
Cc: shuah@...nel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-kselftest@...r.kernel.org
Cc: linux-mm@...ck.org
Cc: x86@...nel.org
Cc: linux-s390@...r.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
Powered by blists - more mailing lists