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: <TYCP286MB2323CF51B2084FB49BEA203ECA769@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM>
Date:   Mon, 29 Aug 2022 15:37:22 +0000
From:   pgd pte <set_pte_at@...look.com>
To:     Vlastimil Babka <vbabka@...e.cz>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Matthew Wilcox <willy@...radead.org>
CC:     "cl@...ux.com" <cl@...ux.com>,
        "penberg@...nel.org" <penberg@...nel.org>,
        "rientjes@...gle.com" <rientjes@...gle.com>,
        "iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "roman.gushchin@...ux.dev" <roman.gushchin@...ux.dev>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 回复: [PATCH] mm: simplify size2index conversion of __kmalloc_index

Interesting, I will see what I can do about it.
Just curious, could for-next testing cover all architectures and compilers?
Thanks for all the insightful comments from you guys, that's very helpful.

________________________________________
发件人: Vlastimil Babka <vbabka@...e.cz>
发送时间: 2022年8月29日 22:21
收件人: Hyeonggon Yoo; Matthew Wilcox
抄送: Dawei Li; cl@...ux.com; penberg@...nel.org; rientjes@...gle.com; iamjoonsoo.kim@....com; akpm@...ux-foundation.org; roman.gushchin@...ux.dev; linux-mm@...ck.org; linux-kernel@...r.kernel.org
主题: Re: [PATCH] mm: simplify size2index conversion of __kmalloc_index

On 8/29/22 05:36, Hyeonggon Yoo wrote:
> On Mon, Aug 29, 2022 at 04:11:04AM +0100, Matthew Wilcox wrote:
>> On Sun, Aug 28, 2022 at 11:14:48PM +0800, Dawei Li wrote:
>> > Current size2index is implemented by one to one hardcode mapping,
>> > which can be improved by order_base_2().
>> > Must be careful to not violate compile-time optimization rule.
>>
>> This patch has been NACKed before (when submitted by other people).
>
>
> Hmm right.
> https://lkml.iu.edu/hypermail/linux/kernel/1606.2/05402.html
>
> Christoph Lameter wrote:
>> On Wed, 22 Jun 2016, Yury Norov wrote:
>> > There will be no fls() for constant at runtime because ilog2() calculates
>> > constant values at compile-time as well. From this point of view,
>> > this patch removes code duplication, as we already have compile-time
>> > log() calculation in kernel, and should re-use it whenever possible.\
>
>> The reason not to use ilog there was that the constant folding did not
>> work correctly with one or the other architectures/compilers. If you want
>> to do this then please verify that all arches reliably do produce a
>> constant there.
>
> Can we re-evaluate this?

Is there a way to turn inability of compile-time calculation to a
compile-time error? (when size_is_constant=true etc). Then we could try and
see if anything breaks in -next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ