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]
Date:   Sun, 21 Nov 2021 14:18:09 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     Alejandro Colomar <alx.manpages@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Arnd Bergmann <arnd@...db.de>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Kees Cook <keescook@...omium.org>,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH v2 12/20] linux/must_be.h: Add must_be() to improve
 readability of BUILD_BUG_ON_ZERO()

On Sat, Nov 20, 2021 at 4:05 PM Alexey Dobriyan <adobriyan@...il.com> wrote:
>
> On Sat, Nov 20, 2021 at 02:00:55PM +0100, Alejandro Colomar wrote:
> > Historically, BUILD_BUG_ON_ZERO() has been hard to read.
> > __must_be_array() is based on BUILD_BUG_ON_ZERO(),
> > and unlike BUILD_BUG_ON_*(),
> > it has a pretty readable name.
>
> The best name is assert() which userspace uses and is standartised.

I would argue that this macro is best left out: we have BUILD_BUG_ON()
as the interface that everyone knows, having another macro that has the
same results only makes things more confusing, and I would ask anyone
using it to use an open-coded BUILD_BUG_ON instead.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ