Thread (11 messages) 11 messages, 2 authors, 2024-07-02

Re: [PATCH v6 4/6] mm/slab: Introduce kmem_buckets_create() and family

From: Kees Cook <kees@kernel.org>
Date: 2024-07-02 20:11:50
Also in: linux-hardening, linux-mm, lkml

On Tue, Jul 02, 2024 at 11:19:28AM +0200, Vlastimil Babka wrote:
On 7/1/24 9:13 PM, Kees Cook wrote:
quoted
 #ifdef SLAB_SUPPORTS_SYSFS
 /*
  * For a given kmem_cache, kmem_cache_destroy() should only be called
@@ -931,6 +1023,10 @@ void __init create_kmalloc_caches(void)
 
 	/* Kmalloc array is now usable */
 	slab_state = UP;
+
+	kmem_buckets_cache = kmem_cache_create("kmalloc_buckets",
+					       sizeof(kmem_buckets),
+					       0, SLAB_NO_MERGE, NULL);
Locally adjusted to put this behind "if (IS_ENABLED(CONFIG_SLAB_BUCKETS))"
Oops, yes, good catch. Thank you!

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help