[PATCH v2 2/5] sparc64: vdso: Use 32-bit CHECKFLAGS for compat vDSO
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Mar 2 18:58:38 AEDT 2026
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: kernel test robot <lkp at intel.com>
Closes: https://lore.kernel.org/lkml/202511030021.9v1mIgts-lkp@intel.com/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
Acked-by: Arnd Bergmann <arnd at arndb.de>
---
The actual false-positive is only reported when SPARC is converted over
to the generic vDSO library. However the issue is already present.
To avoid dependencies between different patch queues, I have this patch
in this one.
---
arch/sparc/vdso/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile
index 13f1d7be00f1..7d6e3097ebfc 100644
--- a/arch/sparc/vdso/Makefile
+++ b/arch/sparc/vdso/Makefile
@@ -90,6 +90,9 @@ KBUILD_CFLAGS_32 += -DDISABLE_BRANCH_PROFILING
KBUILD_CFLAGS_32 += -mv8plus
$(obj)/vdso32.so.dbg: KBUILD_CFLAGS = $(KBUILD_CFLAGS_32)
+CHECKFLAGS_32 := $(filter-out -m64 -D__sparc_v9__ -D__arch64__, $(CHECKFLAGS)) -m32
+$(obj)/vdso32.so.dbg: CHECKFLAGS = $(CHECKFLAGS_32)
+
$(obj)/vdso32.so.dbg: FORCE \
$(obj)/vdso32/vdso32.lds \
$(obj)/vdso32/vclock_gettime.o \
--
2.53.0
More information about the Linuxppc-dev
mailing list