Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/vdso: Use 32-bit CHECKFLAGS for compat vDSO

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>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260302-vdso-compat-checkflags-v2-1-78e55baa58ba@linutronix.de
Closes: https://lore.kernel.org/lkml/20260114084529.1676356-1-sun.jian.kdev@gmail.com/
Closes: https://lore.kernel.org/lkml/20260117215542.342638347@kernel.org/
Closes: https://lore.kernel.org/r/202602111941.PIhubgrb-lkp@intel.com/

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
56f85f67 a5ccec8f

+4
+4
arch/x86/entry/vdso/vdso32/Makefile
··· 15 15 flags-$(CONFIG_X86_64) += -include $(src)/fake_32bit_build.h 16 16 flags-remove-y := -m64 17 17 18 + # Checker flags 19 + CHECKFLAGS := $(subst -m64,-m32,$(CHECKFLAGS)) 20 + CHECKFLAGS := $(subst -D__x86_64__,-D__i386__,$(CHECKFLAGS)) 21 + 18 22 # The location of this include matters! 19 23 include $(src)/../common/Makefile.include 20 24