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]
Date:   Mon, 9 May 2022 13:43:26 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Wonhyuk Yang <vvghjk1234@...il.com>
Cc:     Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [Patch v3] mm/slub: Remove repeated action in calculate_order()

On 5/9/22 11:42, Wonhyuk Yang wrote:

>> > +     if (unlikely(order_objects(slub_min_order, size) > MAX_OBJS_PER_PAGE)) {
>> > +             order = get_order(size * MAX_OBJS_PER_PAGE) - 1;
>> > +             goto out;
>> > +     }
>>
>> Hm interestingly, both before and after your patch, MAX_OBJS_PER_PAGE might
>> be theoretically overflowed not by slub_min_order, but then with higher
>> orders. Seems to be prevented only as a side-effect of fragmentation close
>> to none, thus higher orders not attempted. Would be maybe less confusing to
>> check that explicitly. Even if that's wasteful, but this is not really perf
>> critical code.
> 
> Yes, I agree that checking the overflow of object number explicitly is
> better even if
> it is almost impossible. But it checked repeatedly by calling
> calc_slab_order(). It
> seems to me that is unnecessary doesn't it?

Yeah I'm OK with the goal of your patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ