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

On Wed, 26 Nov 2025 at 14:17, david laight <david.laight@...box.com> wrote:
>
> Mark B. will accuse you of abusing ?: :-)

Compared to '__is_constexpr()', this is child's play.  Not *that* is
abusing the ternary op.

> I've just looked at a .i file.
> GENMASK() currently expands to 855 chars plus four copies of each argument.

Yeah, I don't love it. It's a horrid macro. But because of the odd
order of arguments, it needs all that crazy checking.

That said, I do think it could be simplified. Particularly if we just
make the rule be that GENMASK _has_ to take just constant values.

Right now, I think 99.9% of all users are constants, and we spend a
lot of effort on the 0.1% that isn't.

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ