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] [day] [month] [year] [list]
Message-ID: <CABWKuGWDAfR2WaW7AXv9Tp+qnmhAqveJUxucU9tFccDhj0bLWg@mail.gmail.com>
Date:   Tue, 2 Mar 2021 21:55:11 +0800
From:   Yejune Deng <yejune.deng@...il.com>
To:     Christoph Lameter <cl@...two.de>, willy@...radead.org
Cc:     penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
        akpm@...ux-foundation.org, vbabka@...e.cz, linux-mm@...ck.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] include/linux/slab.h: use for() and left shift to calculate

Thank you. I hadn't thought of that。

On Tue, Mar 2, 2021 at 5:09 PM Christoph Lameter <cl@...two.de> wrote:
>
> On Tue, 2 Mar 2021, Yejune Deng wrote:
>
> > use for() and left shift to calculate the value that compared with size.
>
> There is a reason for the madness...
>
> The current code was written so compilers can do proper constant folding
> and eliminate the whole function entirely.
>
> If you want this change then please verify that all compilers currently in
> use with this code do proper constant folding and never generate code for
> the for loop.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ