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: <20260119081633-7cc7ea7b-65a2-48ef-9d24-8a07838fea87@linutronix.de>
Date: Mon, 19 Jan 2026 08:18:59 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Thomas Gleixner <tglx@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org
Subject: Re: [patch 1/2] x86/vdso: Tweak CHECKFLAGS for 32-bit VDSO build

On Sat, Jan 17, 2026 at 10:58:25PM +0100, Thomas Gleixner wrote:
> 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>

Reviewed-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>

> ---
>  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)

It would be nice if we had a strict variant of $(subst ...) which errors
out if nothing is substituted.

> +
>  $(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