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: <CAHk-=wjx-bDfUiOZB9w4Xg=yyb3JS4kHCChP_+d0AUkkG6sssA@mail.gmail.com>
Date: Thu, 27 Nov 2025 09:29:42 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
Cc: david laight <david.laight@...box.com>, Rasmus Villemoes <ravi@...vas.dk>, 
	"Yury Norov (NVIDIA)" <yury.norov@...il.com>, Linus Walleij <linus.walleij@...aro.org>, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/21] lib: add alternatives for GENMASK()

On Thu, 27 Nov 2025 at 06:12, Nicolas Frattaroli
<nicolas.frattaroli@...labora.com> wrote:
>
> I think enforcing GENMASK to take constant values is a good idea in
> light of that, because people who really need a non-const version
> should make this explicit so that reviewers can catch it as a
> potential code smell, in addition to the less horrid preprocessor
> output.

So I did some very preliminary checking, and we do end up having more
GENMASK() users with non-constant arguments than I thought.

They are still a small minority - about 3% of the users - which is why
my first grep made me think "it's all just constants".

It's just not quite as tiny a minority as I thought from a quick visual grep.

IOW, there's about a thousand cases of GENMASK() with things that
aren't obvious constants.

So trying to get rid of them would be somewhat painful. Fairly easily
automated, but still..

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ