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  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]
Date:   Fri, 31 Aug 2018 23:35:08 +0300
From:   Igor Stoppa <>
To:     Arnd Bergmann <>
Cc:     Linux Kernel Mailing List <>,, Aaro Koskinen <>,
        Alasdair Kergon <>,
        Al Viro <>,
        Andrew Jeffery <>,
        Archit Taneja <>,,,
        Benjamin Herrenschmidt <>,,,
        Christoph Lameter <>,
        David Airlie <>,
        David Daney <>,
        Dennis Zhou <>,,
        Doug Ledford <>,
        "Latif, Faisal" <>,
        gregkh <>,
        Daode Huang <>,
        Inaky Perez-Gonzalez <>,
        "James E.J. Bottomley" <>,
        James Hogan <>,
        Jason Gunthorpe <>,,
        Kalle Valo <>,
        Kees Cook <>,
        Larry Finger <>,
        Linus Walleij <>,
        Madalin-Cristian Bucur <>,
        "Martin K. Petersen" <>,
        Michael Ellerman <>,
        "Michael S. Tsirkin" <>,,
        Mike Snitzer <>,
        Paul Burton <>,
        Paul Mackerras <>,
        "Rafael J. Wysocki" <>,
        Ralf Baechle <>,
        Rob Clark <>,,
        Salil Mehta <>,
        Shuah Khan <>,,,
        Tejun Heo <>,,
Subject: Re: [PATCH 00/23] Make use of unlikely() more consistently.

On 31/08/18 17:09, Arnd Bergmann wrote:


>> #define assert(condition)
>> ...
>>          if (unlikely(!(condition)))
>>                  error_action()
>> ...
> There is a potential that this introduces false-postive -Wmaybe-uninitialized
> set, since that turns unlikely() into a complex operation that in turn
> confuses the compiler so it no longer keeps track of which variables
> are initialized or not.
> It's possible that none of your patches do that, but one needs to be aware
> of the problem, and possibly revert some of your patches if it does cause
> warning regressions in drivers that don't actually benefit from the
> micro-optimization.

I see.
But if such case might arise, it might be possible, instead of reverting 
these patches, to locally - and conditionally - turn unlikely() into an 
identity macro.

For example:

#define unlikely(x) (x)

Without giving up the hint for the case of normal compilation.


Powered by blists - more mailing lists