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: <1bbabb8a-02c8-7247-0084-776a32558130@suse.cz>
Date:   Tue, 14 Nov 2023 21:19:34 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Kees Cook <keescook@...omium.org>
Cc:     David Rientjes <rientjes@...gle.com>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Roman Gushchin <roman.gushchin@...ux.dev>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, patches@...ts.linux.dev,
        Andrey Ryabinin <ryabinin.a.a@...il.com>,
        Alexander Potapenko <glider@...gle.com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Marco Elver <elver@...gle.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Michal Hocko <mhocko@...nel.org>,
        Shakeel Butt <shakeelb@...gle.com>,
        Muchun Song <muchun.song@...ux.dev>,
        kasan-dev@...glegroups.com, cgroups@...r.kernel.org
Subject: Re: [PATCH 06/20] mm/slab: remove CONFIG_SLAB code from slab common
 code

On 11/14/23 05:30, Kees Cook wrote:
> On Mon, Nov 13, 2023 at 08:13:47PM +0100, Vlastimil Babka wrote:
>> In slab_common.c and slab.h headers, we can now remove all code behind
>> CONFIG_SLAB and CONFIG_DEBUG_SLAB ifdefs, and remove all CONFIG_SLUB
>> ifdefs.
>> 
>> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
>> ---
>>  include/linux/slab.h | 13 +--------
>>  mm/slab.h            | 69 ++++----------------------------------------
>>  mm/slab_common.c     | 22 ++------------
>>  3 files changed, 8 insertions(+), 96 deletions(-)
>> 
>> diff --git a/include/linux/slab.h b/include/linux/slab.h
>> index 34e43cddc520..90fb1f0d843a 100644
>> --- a/include/linux/slab.h
>> +++ b/include/linux/slab.h
>> @@ -24,7 +24,6 @@
>>  
>>  /*
>>   * Flags to pass to kmem_cache_create().
>> - * The ones marked DEBUG are only valid if CONFIG_DEBUG_SLAB is set.
> 
> I think this comment was wrong, yes? i.e. the "DEBUG" flags are also
> used in SLUB?

Hm yeah we could change it to CONFIG_SLUB_DEBUG. I deleted it because I
didn't think "valid" was the right word, they are always valid (part of
SLAB_FLAGS_PERMITTED thus not returning -EINVAL on cache creation), but they
would be no-op (not part of CACHE_CREATE_MASK) without CONFIG_SLUB_DEBUG.

So we coould change it to e.g.
"The ones marked DEBUG are ignored unless CONFIG_SLUB_DEBUG is enabled" ?

> Regardless:
> 
> Reviewed-by: Kees Cook <keescook@...omium.org>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ