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: <0862b091-d5bd-1492-b12f-19657604eb54@google.com>
Date: Sat, 20 Jul 2024 19:36:51 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Vlastimil Babka <vbabka@...e.cz>
cc: "Paul E. McKenney" <paulmck@...nel.org>, 
    Joel Fernandes <joel@...lfernandes.org>, 
    Josh Triplett <josh@...htriplett.org>, Boqun Feng <boqun.feng@...il.com>, 
    Christoph Lameter <cl@...ux.com>, Steven Rostedt <rostedt@...dmis.org>, 
    Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
    Lai Jiangshan <jiangshanlai@...il.com>, Zqiang <qiang.zhang1211@...il.com>, 
    Julia Lawall <Julia.Lawall@...ia.fr>, Jakub Kicinski <kuba@...nel.org>, 
    "Jason A. Donenfeld" <Jason@...c4.com>, 
    "Uladzislau Rezki (Sony)" <urezki@...il.com>, 
    Andrew Morton <akpm@...ux-foundation.org>, 
    Roman Gushchin <roman.gushchin@...ux.dev>, 
    Hyeonggon Yoo <42.hyeyoo@...il.com>, linux-mm@...ck.org, 
    linux-kernel@...r.kernel.org, rcu@...r.kernel.org
Subject: Re: [PATCH RFC 1/6] mm, slab: make caches with refcount of 0
 unmergeable

On Mon, 15 Jul 2024, Vlastimil Babka wrote:

> Slab caches with refcount 0 are in the process of being destroyed so
> it's undesirable for new caches to attempt merging with them. A
> synchronous destruction happens under slab_mutex thus excluding
> concurrent cache creation and merging. Full destruction of
> SLAB_TYPESAFE_BY_RCU caches might be delayed, but the cache is still
> taken off the slab_caches list immediately, thus unreachable by cache
> creation.
> 
> However a cache where __kmem_cache_shutdown() fails because it contains
> objects that were not freed (due to a bug in the cache user) will be
> left on the slab_caches list and might be considered for merging.
> Also the following patches will introduce a possibility of a cache with
> refcount 0 being temporarily reachable on the slab_list even in case of
> no bugs, due to kfree_rcu() in flight.
> 
> For these reasons, prevent merging with caches that have zero refcount.
> 
> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>

Acked-by: David Rientjes <rientjes@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ