From: Bill Roberts <bill.roberts@arm.com>
To: "H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
rick.p.edgecombe@intel.com, Shuah Khan <shuah@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
x86@kernel.org
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Bill Roberts <bill.roberts@arm.com>
Subject: [PATCH v5 1/6] selftests/x86: fix Makefile dependencies
Date: Mon, 9 Nov 2026 12:27:53 -0600 [thread overview]
Message-ID: <20261109182758.252223-2-bill.roberts@arm.com> (raw)
In-Reply-To: <20261109182758.252223-1-bill.roberts@arm.com>
The amx_64, avx_64, and apx_64 tests compile xstate.c as an
additional source file. However, their Makefile rules add xstate.c
directly to EXTRA_FILES without registering it as a prerequisite.
As a result, modifying xstate.c does not trigger a rebuild of the
affected test binaries, potentially leaving stale test executables.
Use the existing extra-files macro to register xstate.c as both
an additional compilation input and a build dependency.
Signed-off-by: Bill Roberts <bill.roberts@arm.com>
---
tools/testing/selftests/x86/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile
index 7565d2cf6a3c..407f52ac2628 100644
--- a/tools/testing/selftests/x86/Makefile
+++ b/tools/testing/selftests/x86/Makefile
@@ -125,6 +125,9 @@ $(eval $(call extra-files,test_syscall_vdso_32,thunks_32.S))
$(eval $(call extra-files,fsgsbase_restore_64,clang_helpers_64.S))
$(eval $(call extra-files,fsgsbase_restore_32,clang_helpers_32.S))
$(eval $(call extra-files,sysret_rip_64,clang_helpers_64.S))
+$(eval $(call extra-files,amx_64,xstate.c))
+$(eval $(call extra-files,avx_64,xstate.c))
+$(eval $(call extra-files,apx_64,xstate.c))
# check_initial_reg_state is special: it needs a custom entry, and it
# needs to be static so that its interpreter doesn't destroy its initial
@@ -136,8 +139,5 @@ $(OUTPUT)/nx_stack_32: CFLAGS += -Wl,-z,noexecstack
$(OUTPUT)/nx_stack_64: CFLAGS += -Wl,-z,noexecstack
$(OUTPUT)/avx_64: CFLAGS += -mno-avx -mno-avx512f
-$(OUTPUT)/amx_64: EXTRA_FILES += xstate.c
-$(OUTPUT)/avx_64: EXTRA_FILES += xstate.c
-$(OUTPUT)/apx_64: EXTRA_FILES += xstate.c
$(OUTPUT)/sigframe_fpu_portability_64: CFLAGS += -mno-avx -mno-avx512f
--
2.55.0
next prev parent reply other threads:[~2026-11-09 18:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 18:27 [PATCH v5 0/6] x86: Support shstk via prctl Bill Roberts
2026-11-09 18:27 ` Bill Roberts [this message]
2026-11-09 18:27 ` [PATCH v5 2/6] selftests/x86: fix fork bug Bill Roberts
2026-11-09 18:27 ` [PATCH v5 3/6] selftests/x86: add shadow stack lock test Bill Roberts
2026-11-09 18:27 ` [PATCH v5 4/6] x86/shstk: support via prctl Bill Roberts
2026-11-09 18:27 ` [PATCH v5 5/6] selftests/x86: support header files in extra-files Bill Roberts
2026-11-09 18:27 ` [PATCH v5 6/6] selftests/x86: add generic prctl shadow stack test Bill Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261109182758.252223-2-bill.roberts@arm.com \
--to=bill.roberts@arm.com \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=shuah@kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®