Re: [PATCH] selftests: vDSO: Fix header search list for vgetrandom-chacha.S

From: Thomas Huth

Date: Mon Nov 02 2026 - 03:11:09 EST


On 30/10/2026 22.36, Arnd Bergmann wrote:
On Fri, Oct 30, 2026, at 18:43, Thomas Huth wrote:
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@xxxxxxxxxx>
---
See this link for the build failure:
https://lore.kernel.org/oe-kbuild-all/9e294bfd-4704-42a5-a704-f301f4afe042@xxxxxxxxxxxxxxxx/

Tested-by: Arnd Bergmann <arnd@xxxxxxxx> # (build tested)

If you like, I can add this to the asm-generic tree to avoid the
regression from your series, or Shuah can pick this up the normal
way as a bugfix for kselftest.
It's maybe better to stick the patch close to my other patches to avoid that other people run into problems when bisecting later, so unless Shuah objects I'd prefer if you could pick it up, Arnd!

Thanks,
Thomas