Re: [RFC PATCH 1/5] vdso: Provide a sanitized subset of UAPI types
From: Fang Xieyan
Date: Wed Dec 02 2026 - 07:49:29 EST
On 2026-12-01 12:28:27+0100, Thomas Weißschuh wrote:
> I am really not a fan of all the duplication.
Fair enough, consider the series withdrawn.
> It would be much nicer if we can avoid pulling in the non-UAPI headers
> when building the vDSO. (And have a compile-time check enforcing this)
Agreed, that is where I want to take this too.
> Maybe you could start by chipping away on the header dependency chains
> pulling in kernel headers from the vDSO builds. These will need to go
> away in any case. And when they are gone the problem will have become
> simpler and easier to discuss.
That is where I am starting. A first pass over the x86 build suggests
that the vDSO sources include only a handful of kernel headers
directly; most of the rest arrives before the first source line is
parsed, from the three -include files and -D__KERNEL__ in the vDSO
cflags. The uapi/ prefix avoids include/linux/ but not the asm
headers. I will report back once the x86 side is clearer.
> So this type is broken on x32 now? I am aware that we don't really build the
> x32 anyways and x32 is on its way out. But this is a very brittle pattern.
Nothing is broken today: the x32 vDSO objects are objcopy'd from the
-m64 ones, so __kernel_long_t resolves to a 64-bit long on both sides.
You are right about the pattern, though. If the type is ever taken from
the UAPI header instead of a local copy, the guard should go with it.