Re: [PATCH v2 2/6] mm/slab: Enable SLAB_FREELIST_RANDOM by default
From: Chris Down
Date: Fri Nov 13 2026 - 05:39:50 EST
Hi Kees,
Kees Cook writes:
Again, just like it should be. I wonder, though, don't these 2 changes
undercut the goal of making these boot-time selectable?
I don't think so. The goal is to stop needing separate images for hosts
with different needs. It was never to make every option switchable for
its own sake. For these two, the only real argument for leaving them out
was CPU cost, and with sheaves that cost doesn't show up at the system
level [1]. So turning them on everywhere removes the reason to build
without them at all. Anyone who still wants them off can still say n at
build time.
SLAB_BUCKETS and KMALLOC_PARTITION_CACHES are different. Their cost is
memory, which is real and doesn't go away with sheaves, so those are the
ones where a boot time switch makes sense.
[1] https://lore.kernel.org/r/auITixAJMfLtfa7i@xxxxxxxxxxxxxx
Thanks for the review!
Chris