Re: [PATCH 0/8] mm/slab: Support selecting slab hardening features at boot

From: Harry Yoo

Date: Wed Oct 28 2026 - 11:08:19 EST


Hi Chris!

On Tue, Oct 27, 2026 at 03:35:16PM +0800, Chris Down wrote:
> Slab hardening settings are currently all build time choices. This means
> that, unfortunately, hosts with different requirements end up needing
> separate kernel images. Let's allow those hosts to use one image and
> select each policy at boot instead.
>
> This series adds four new boot parameters that default to their values
> from CONFIG_*:
>
> slab_freelist_hardened=
> slab_freelist_random=
> slab_buckets=
> kmalloc_partition=

If we end up supporting boot-time parameters for hardening,
I think it should be all enabled (or disabled) by:

slab_hardening=none|light|full
# please feel free to suggest bertter names

none: "Turn of all of them to maximize performance"

light: "I'm willying to sacrifice _some_ memory and CPU for security"

full: "I'm willying to sacrifice more overhead for security

IMHO more fine-grained knob for each feature doesn't make much sense.

--
Cheers,
Harry / Hyeonggon