[tip: timers/vdso] x86/vdso: Use 32-bit CHECKFLAGS for compat vDSO
From: tip-bot2 for Thomas Weißschuh
Date: Wed Mar 11 2026 - 06:16:09 EST
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: 56f85f67b3e20b105fa23bf97bfc8b6d5cdbbef0
Gitweb: https://git.kernel.org/tip/56f85f67b3e20b105fa23bf97bfc8b6d5cdbbef0
Author: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
AuthorDate: Mon, 02 Mar 2026 08:58:37 +01:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Wed, 11 Mar 2026 10:15:42 +01:00
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@xxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
Link: https://patch.msgid.link/20260302-vdso-compat-checkflags-v2-1-78e55baa58ba@xxxxxxxxxxxxx
Closes: https://lore.kernel.org/lkml/20260114084529.1676356-1-sun.jian.kdev@xxxxxxxxx/
Closes: https://lore.kernel.org/lkml/20260117215542.342638347@xxxxxxxxxx/
Closes: https://lore.kernel.org/r/202602111941.PIhubgrb-lkp@xxxxxxxxx/
---
arch/x86/entry/vdso/vdso32/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/entry/vdso/vdso32/Makefile b/arch/x86/entry/vdso/vdso32/Makefile
index add6afb..ded4fc6 100644
--- a/arch/x86/entry/vdso/vdso32/Makefile
+++ b/arch/x86/entry/vdso/vdso32/Makefile
@@ -15,6 +15,10 @@ flags-y := -DBUILD_VDSO32 -m32 -mregparm=0
flags-$(CONFIG_X86_64) += -include $(src)/fake_32bit_build.h
flags-remove-y := -m64
+# Checker flags
+CHECKFLAGS := $(subst -m64,-m32,$(CHECKFLAGS))
+CHECKFLAGS := $(subst -D__x86_64__,-D__i386__,$(CHECKFLAGS))
+
# The location of this include matters!
include $(src)/../common/Makefile.include