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]
Date:   Tue, 14 Nov 2023 21:24:41 +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 11/20] mm/slab: consolidate includes in the internal
 mm/slab.h

On 11/14/23 05:41, Kees Cook wrote:
> On Mon, Nov 13, 2023 at 08:13:52PM +0100, Vlastimil Babka wrote:
>> The #include's are scattered at several places of the file, but it does
>> not seem this is needed to prevent any include loops (anymore?) so
>> consolidate them at the top. Also move the misplaced kmem_cache_init()
>> declaration away from the top.
>> 
>> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
>> ---
>>  mm/slab.h | 28 ++++++++++++++--------------
>>  1 file changed, 14 insertions(+), 14 deletions(-)
>> 
>> diff --git a/mm/slab.h b/mm/slab.h
>> index 6e76216ac74e..c278f8b15251 100644
>> --- a/mm/slab.h
>> +++ b/mm/slab.h
>> @@ -1,10 +1,22 @@
>>  /* SPDX-License-Identifier: GPL-2.0 */
>>  #ifndef MM_SLAB_H
>>  #define MM_SLAB_H
>> +
>> +#include <linux/reciprocal_div.h>
>> +#include <linux/list_lru.h>
>> +#include <linux/local_lock.h>
>> +#include <linux/random.h>
>> +#include <linux/kobject.h>
>> +#include <linux/sched/mm.h>
>> +#include <linux/memcontrol.h>
>> +#include <linux/fault-inject.h>
>> +#include <linux/kmemleak.h>
>> +#include <linux/kfence.h>
>> +#include <linux/kasan.h>
> 
> I've seen kernel code style in other places ask that includes be
> organized alphabetically. Is the order here in this order for some
> particular reason?

Hm not aware of the alphabetical suggestion. I usually order by going from
more low-level and self-contained headers to the more complex ones that
transitively include more, so did that here as well but it's not a precise
process.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ