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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGRVJHZF36KGVs4c@yury>
Date: Tue, 1 Jul 2025 17:37:40 -0400
From: Yury Norov <yury.norov@...il.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>,
	Vincent Mailhol <mailhol.vincent@...adoo.fr>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] uapi: bitops: use UAPI-safe variant of BITS_PER_LONG
 again (2)

On Mon, Jun 30, 2025 at 10:52:54AM -0400, Yury Norov wrote:
> On Mon, Jun 30, 2025 at 03:02:18PM +0200, Thomas Weißschuh wrote:
> > BITS_PER_LONG does not exist in UAPI headers, so can't be used by the UAPI
> > __GENMASK(). Instead __BITS_PER_LONG needs to be used.
> > 
> > When __GENMASK() was introduced in commit 3c7a8e190bc5 ("uapi: introduce uapi-friendly macros for GENMASK"),
> > the code was fine. A broken revert in 1e7933a575ed ("uapi: Revert "bitops: avoid integer overflow in GENMASK(_ULL)"")
> > introduced the incorrect usage of BITS_PER_LONG.
> > That was fixed in commit 11fcf368506d ("uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again").
> > But a broken sync of the kernel headers with the tools/ headers in
> > commit fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources")
> > undid the fix.
> > 
> > Reapply the fix and while at it also fix the tools header.
> > 
> > Fixes: fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources")
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> 
> Acked-by: Yury Norov (NVIDIA) <yury.norov@...il.com>
> 
> Arnaldo, do you want to move it yourself or with my branch?

OK, added this in bitmap-for-next together with the MAINTAINERS patch.

Thanks Tomas for looking after that!

Thanks,
Yury

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ