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: <8bc31ec7-5d6e-b4c0-9d6e-42849673f35f@linux.com>
Date: Thu, 22 Feb 2024 19:12:14 -0800 (PST)
From: "Christoph Lameter (Ampere)" <cl@...ux.com>
To: Vlastimil Babka <vbabka@...e.cz>
cc: 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>, 
    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>, 
    Zheng Yejian <zhengyejian1@...wei.com>, 
    Xiongwei Song <xiongwei.song@...driver.com>, 
    Chengming Zhou <chengming.zhou@...ux.dev>, linux-mm@...ck.org, 
    linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com
Subject: Re: [PATCH 2/3] mm, slab: use an enum to define SLAB_ cache creation
 flags

On Tue, 20 Feb 2024, Vlastimil Babka wrote:

> diff --git a/mm/slub.c b/mm/slub.c
> index 2ef88bbf56a3..a93c5a17cbbb 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -306,13 +306,13 @@ static inline bool kmem_cache_has_cpu_partial(struct kmem_cache *s)
>
> /* Internal SLUB flags */
> /* Poison object */
> -#define __OBJECT_POISON		((slab_flags_t __force)0x80000000U)
> +#define __OBJECT_POISON		__SF_BIT(_SLAB_OBJECT_POISON)
> /* Use cmpxchg_double */
>
> #ifdef system_has_freelist_aba
> -#define __CMPXCHG_DOUBLE	((slab_flags_t __force)0x40000000U)
> +#define __CMPXCHG_DOUBLE	__SF_BIT(_SLAB_CMPXCHG_DOUBLE)
> #else
> -#define __CMPXCHG_DOUBLE	((slab_flags_t __force)0U)
> +#define __CMPXCHG_DOUBLE	0
> #endif

Maybe its good to put these internal flags together with the other flags. 
After all there is no other slab allocator available anymore and having 
them all together avoids confusion.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ