lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260117215542.342638347@kernel.org>
Date: Sat, 17 Jan 2026 22:58:25 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org,
 Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [patch 1/2] x86/vdso: Tweak CHECKFLAGS for 32-bit VDSO build

Sparse complains about a too large shift in the VDSO32 source file:

  arch/x86/entry/vdso/vdso32/vclock_gettime.c: note: in included file (through /home/tglx/work/kernel/tip/tip/arch/x86/entry/vdso/vdso32/../vclock_gettime.c):
  arch/x86/entry/vdso/vdso32/../../../../../lib/vdso/gettimeofday.c:454:26: warning: shift too big (40) for type unsigned long

That's because sparse is invoked with -D__x86_64__ -m64 on the command
line, which causes it to use __BITS_PER_LONG = 64. That causes __GENMASK()
to use a way too big shift value.

Give the CHECKFLAGS which are handed to sparse a similar treatment as
KBUILD_CFLAGS get for the 32-bit VDSO build.

Signed-off-by: Thomas Gleixner <tglx@...nel.org>
---
 arch/x86/entry/vdso/Makefile |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -144,6 +144,10 @@ endif
 
 $(obj)/vdso32.so.dbg: KBUILD_CFLAGS = $(KBUILD_CFLAGS_32)
 
+CHECKFLAGS_32 := $(subst -m64,-m32,$(CHECKFLAGS))
+CHECKFLAGS_32 := $(subst -D__x86_64__,-D__i386__,$(CHECKFLAGS_32))
+$(obj)/vdso32.so.dbg: CHECKFLAGS = $(CHECKFLAGS_32)
+
 $(obj)/vdso32.so.dbg: $(obj)/vdso32/vdso32.lds $(vobjs32) FORCE
 	$(call if_changed,vdso_and_check)
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ