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:   Tue, 1 Dec 2020 22:01:36 +0100
From:   Rasmus Villemoes <linux@...musvillemoes.dk>
To:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Marco Elver <elver@...gle.com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kasan-dev <kasan-dev@...glegroups.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Joe Perches <joe@...ches.com>, George Burgess <gbiv@...gle.com>
Subject: Re: [PATCH] genksyms: Ignore module scoped _Static_assert()

On 01/12/2020 20.56, Nick Desaulniers wrote:
> On Tue, Dec 1, 2020 at 9:04 AM Marco Elver <elver@...gle.com> wrote:
>>
>> On Tue, Dec 01, 2020 at 04:14PM +0000, Christoph Hellwig wrote:
>>> Why not use the kernels own BUILD_BUG_ON instead of this idiom?
>>
> And to proactively address the inevitable: why do we have both?  We
> looked into wholesale replacing BUILD_BUG_ON's implementation with
> _Static_assert, but found that they differ slightly in the handling of
> integer constant expressions; BUILD_BUG_ON was reliant on some
> compiler optimizations in expressions making use of
> __builtin_constant_p that cannot be evaluated when the compiler
> performs the _Static_assert check. 

... and _Static_assert() is a declaration, so even many of the
BUILD_BUG_ON() that have a bona fide ICE cannot be converted because
declaration-after-statement.

Rasmus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ