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: <0c7b552f-c494-4d0e-b956-38b5e235917c@suse.cz>
Date: Tue, 27 Jan 2026 17:59:00 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: "Liam R. Howlett" <Liam.Howlett@...cle.com>,
 Harry Yoo <harry.yoo@...cle.com>, Petr Tesarik <ptesarik@...e.com>,
 Christoph Lameter <cl@...two.org>, David Rientjes <rientjes@...gle.com>,
 Roman Gushchin <roman.gushchin@...ux.dev>, Hao Li <hao.li@...ux.dev>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Uladzislau Rezki <urezki@...il.com>, Suren Baghdasaryan <surenb@...gle.com>,
 Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 Alexei Starovoitov <ast@...nel.org>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev,
 bpf@...r.kernel.org, kasan-dev@...glegroups.com
Subject: Re: [PATCH v4 04/22] mm/slab: move and refactor __kmem_cache_alias()

On 1/27/26 17:17, Liam R. Howlett wrote:
> * Vlastimil Babka <vbabka@...e.cz> [260123 01:53]:
>> Move __kmem_cache_alias() to slab_common.c since it's called by
>> __kmem_cache_create_args() and calls find_mergeable() that both
>> are in this file. We can remove two slab.h declarations and make
>> them static. Instead declare sysfs_slab_alias() from slub.c so
>> that __kmem_cache_alias() can keep calling it.
>> 
>> Add args parameter to __kmem_cache_alias() and find_mergeable() instead
>> of align and ctor. With that we can also move the checks for usersize
>> and sheaf_capacity there from __kmem_cache_create_args() and make the
>> result more symmetric with slab_unmergeable().
>> 
>> No functional changes intended.
>> 
>> Reviewed-by: Harry Yoo <harry.yoo@...cle.com>
>> Reviewed-by: Suren Baghdasaryan <surenb@...gle.com>
>> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
> 
> One nit.
> 
> Reviewed-by: Liam R. Howlett <Liam.Howlett@...cle.com>

Thanks.

>> ---
>>  mm/slab.h        |  8 +++-----
>>  mm/slab_common.c | 44 +++++++++++++++++++++++++++++++++++++-------
>>  mm/slub.c        | 30 +-----------------------------
>>  3 files changed, 41 insertions(+), 41 deletions(-)
>> 
>> diff --git a/mm/slab.h b/mm/slab.h
>> index e767aa7e91b0..cb48ce5014ba 100644
>> --- a/mm/slab.h
>> +++ b/mm/slab.h
>> @@ -281,9 +281,12 @@ struct kmem_cache {
>>  #define SLAB_SUPPORTS_SYSFS 1
>>  void sysfs_slab_unlink(struct kmem_cache *s);
>>  void sysfs_slab_release(struct kmem_cache *s);
>> +int sysfs_slab_alias(struct kmem_cache *, const char *);
> 
> nit: the names of the variables are missing.  I guess because they were
> missing before.  *s and *name,  I guess, although they are *s and *p
> in the other declaration.

Yeah will change both to s and name, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ