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: <aQKtOw82R5ONMWvM@hyeyoo>
Date: Thu, 30 Oct 2025 09:11:39 +0900
From: Harry Yoo <harry.yoo@...cle.com>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Lameter <cl@...two.org>,
        David Rientjes <rientjes@...gle.com>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Uladzislau Rezki <urezki@...il.com>,
        "Liam R. Howlett" <Liam.Howlett@...cle.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 RFC 08/19] slab: handle kmalloc sheaves bootstrap

On Wed, Oct 29, 2025 at 09:06:45PM +0100, Vlastimil Babka wrote:
> On 10/29/25 21:06, Vlastimil Babka wrote:
> > On 10/27/25 07:12, Harry Yoo wrote:
> >>> @@ -8549,6 +8559,74 @@ static struct kmem_cache * __init bootstrap(struct kmem_cache *static_cache)
> >>>  	return s;
> >>>  }
> >>>  
> >>> +/*
> >>> + * Finish the sheaves initialization done normally by init_percpu_sheaves() and
> >>> + * init_kmem_cache_nodes(). For normal kmalloc caches we have to bootstrap it
> >>> + * since sheaves and barns are allocated by kmalloc.
> >>> + */
> >>> +static void __init bootstrap_cache_sheaves(struct kmem_cache *s)
> >>> +{
> >>> +	struct kmem_cache_args empty_args = {};
> >>> +	unsigned int capacity;
> >>> +	bool failed = false;
> >>> +	int node, cpu;
> >>> +
> >>> +	capacity = calculate_sheaf_capacity(s, &empty_args);
> >>> +
> >>> +	/* capacity can be 0 due to debugging or SLUB_TINY */
> >>> +	if (!capacity)
> >>> +		return;
> >> 
> >> I think pcs->main should still be !NULL in this case?
> > 
> > It will remain to be set to bootstrap_sheaf, and with s->sheaf_capacity
> 
> ... s->sheaf_capacity remaining 0
> 
> > things will continue to work.

Oh right. it's set to bootstrap_sheaf in init_percpu_sheaves() before
bootstrap_cache_sheaves() is called. Looks good then!

-- 
Cheers,
Harry / Hyeonggon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ