[PATCH 0/4] vDSO: Use 32-bit CHECKFLAGS for compat vDSO

Thomas Weißschuh
2026-01-16T07:40:51Z

When building the compat vDSO the CHECKFLAGS from the 64-bit kernel
are used. These are combined with the 32-bit CFLAGS. This confuses
sparse, producing false-positive warnings or potentially missing
real issues.

Manually override the CHECKFLAGS for the compat vDSO with the correct
32-bit configuration.

Not all architectures are supported, as many do not use sparse for their
(compat) vDSO. These can be enabled later.

Also add some checks to bitsperlong.h to detect such issues earlier.

Based on tip/timers/vdso.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (4):
sparc64: vdso: Use 32-bit CHECKFLAGS for compat vDSO
x86/vdso: Use 32-bit CHECKFLAGS for compat vDSO
s390/vdso: Trim includes in linker script
asm-generic/bitsperlong.h: Add sanity checks for __BITS_PER_LONG

arch/s390/kernel/vdso/vdso.lds.S | 3 +--
arch/sparc/vdso/Makefile | 3 +++
arch/x86/entry/vdso/Makefile | 3 +++
include/uapi/asm-generic/bitsperlong.h | 14 ++++++++++++++
4 files changed, 21 insertions(+), 2 deletions(-)
---
base-commit: a37abd052c0bd9d1194710a39008801379f8ff5a
change-id: 20251107-vdso-compat-checkflags-5db75b3b4bac

Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>