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: <8e2447d1-c0ae-1d25-2447-10bde334a808@google.com>
Date: Sat, 20 Jul 2024 19:37:45 -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 2/6] mm, slab: always maintain per-node slab and
 object count

On Mon, 15 Jul 2024, Vlastimil Babka wrote:

> Currently SLUB counts per-node slabs and total objects only with
> CONFIG_SLUB_DEBUG, in order to minimize overhead. However, the detection
> in __kmem_cache_shutdown() whether there are no outstanding object
> relies on the per-node slab count (node_nr_slabs()) so it may be
> unreliable without CONFIG_SLUB_DEBUG. Thus we might be failing to warn
> about such situations, and instead destroy a cache while leaving its
> slab(s) around (due to a buggy slab user creating such a scenario, not
> in normal operation).
> 
> We will also need node_nr_slabs() to be reliable in the following work
> to gracefully handle kmem_cache_destroy() with kfree_rcu() objects in
> flight. Thus make the counting of per-node slabs and objects
> unconditional.
> 
> Note that CONFIG_SLUB_DEBUG is the default anyway, and the counting is
> done only when allocating or freeing a slab page, so even in
> !CONFIG_SLUB_DEBUG configs the overhead should be negligible.
> 
> 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