Re: [PATCH 2/4] x86/vdso: Use 32-bit CHECKFLAGS for compat vDSO

Arnd Bergmann
2026-01-16T07:49:35Z

On Fri, Jan 16, 2026, at 08:40, Thomas Weißschuh wrote:
> 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.
>
> Reported-by: Sun Jian <sun.jian.kdev@gmail.com>
> Closes:
> https://lore.kernel.org/lkml/20260114084529.1676356-1-sun.jian.kdev@gmail.com/
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Acked-by: Arnd Bergmann <arnd@arndb.de>

> +CHECKFLAGS_32 := $(CHECKFLAGS) -U__x86_64__ -D__i386__ -m32
> +
> $(obj)/vdso32.so.dbg: KBUILD_CFLAGS = $(KBUILD_CFLAGS_32)
> +$(obj)/vdso32.so.dbg: CHECKFLAGS = $(CHECKFLAGS_32)

Have you checked if something like this is needed for x32 as well?

Arnd