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: <CAK8P3a1svD_pog3-ZKnQAv=Li3=U9kB_ApXQOkzH-UCLtaQMEQ@mail.gmail.com>
Date:   Sun, 21 Nov 2021 14:25:48 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Alejandro Colomar <alx.manpages@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Arnd Bergmann <arnd@...db.de>,
        Alexey Dobriyan <adobriyan@...il.com>,
        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 15/20] linux/compiler.h: Implement __must_be_array() in
 terms of __must_be()

On Sat, Nov 20, 2021 at 2:00 PM Alejandro Colomar
<alx.manpages@...il.com> wrote:

> @@ -255,7 +255,7 @@ static inline void *offset_to_ptr(const int *off)
>  #endif /* __ASSEMBLY__ */
>
>  /* &a[0] degrades to a pointer: a different type from an array */
> -#define __must_be_array(a)     BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
> +#define __must_be_array(a)  __must_be(!__same_type((a), &(a)[0]))

Please go the other way here and change all users of __must_be() to use
BUILD_BUG_ON_ZERO() or BUILD_BUG_ON() for consistency.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ