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: <8734jwnrrz.fsf@prevas.dk>
Date: Tue, 12 Nov 2024 21:03:44 +0100
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Vincent Mailhol <mailhol.vincent@...adoo.fr>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,  Yury Norov
 <yury.norov@...il.com>,  Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
  linux-kernel@...r.kernel.org,  linux-sparse@...r.kernel.org,  Rikard
 Falkeborn <rikard.falkeborn@...il.com>
Subject: Re: [RESEND PATCH v3 1/2] compiler.h: add _static_assert()

On Wed, Nov 13 2024, Vincent Mailhol <mailhol.vincent@...adoo.fr> wrote:

>
> Declare a new _statically_true() macro which, by making use of the
> __builtin_choose_expr() and __is_constexpr(x) combo, always produces a
> constant expression.

Looks sane, but $subject needs s/_static_assert/_statically_true/. And
to be completely pedantic, macros are defined, not declared.
>
>   - above examples, and a bit more:
>
>       https://godbolt.org/z/zzqM1ajPj
>
>   - a proof that statically_true() does better constant folding than _statically_true()
>
>       https://godbolt.org/z/vK6KK4hMG

At least the second of these might be good to refer to in the commit
message itself.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ