From: Thomas Huth <thuth@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>, Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: soc@lists.linux.dev, Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH] selftests: vDSO: Fix header search list for vgetrandom-chacha.S
Date: Fri, 30 Oct 2026 18:43:23 +0100 [thread overview]
Message-ID: <20261030174323.370687-1-thuth@redhat.com> (raw)
On aarch64, vgetrandom-chacha.S includes the assembler file from
arch/arm64/kernel/vdso/vgetrandom-chacha.S, and that includes
<asm/assembler.h> which in turn includes lots of system header files.
For this, we should make sure that the kernel headers of the
*current* kernel are in the search path of the compiler, otherwise
we end up including headers from /usr/include of the current distro
instead, and this is calling for trouble! Thus use $(KHDR_INCLUDES)
here to make sure that we are using the right header files.
(This issue has been found in a patch series that replaces __ASSEMBLY__
with __ASSEMBLER__ in the various kernel headers and finally stops
defining __ASSEMBLY__ in the kernel makefiles - when vgetrandom-chacha.S
now tries to include a header from /usr/include the compilation fails
since those headers still require __ASSEMBLY__ to fence away the C code)
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
See this link for the build failure:
https://lore.kernel.org/oe-kbuild-all/9e294bfd-4704-42a5-a704-f301f4afe042@app.fastmail.com/
tools/testing/selftests/vDSO/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index a61047bdcd576..1af346ac87081 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -37,7 +37,8 @@ $(OUTPUT)/vdso_test_getrandom: CFLAGS += -isystem $(top_srcdir)/tools/include \
-isystem $(top_srcdir)/include/uapi
$(OUTPUT)/vdso_test_chacha: vgetrandom-chacha.S
-$(OUTPUT)/vdso_test_chacha: CFLAGS += -idirafter $(top_srcdir)/tools/include \
+$(OUTPUT)/vdso_test_chacha: CFLAGS += $(KHDR_INCLUDES) \
+ -idirafter $(top_srcdir)/tools/include \
-idirafter $(top_srcdir)/tools/include/generated \
-idirafter $(top_srcdir)/arch/$(SRCARCH)/include \
-idirafter $(top_srcdir)/include \
--
2.56.0
next reply other threads:[~2026-10-30 17:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 17:43 Thomas Huth [this message]
2026-10-30 21:36 ` Arnd Bergmann
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=20261030174323.370687-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=shuah@kernel.org \
--cc=soc@lists.linux.dev \
--cc=tglx@kernel.org \
--cc=vincenzo.frascino@arm.com \
/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®