]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commit
linux: Do not allow slab caches to be merged
authorPeter Müller <peter.mueller@ipfire.org>
Mon, 1 Aug 2022 17:39:59 +0000 (17:39 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 6 Aug 2022 13:51:02 +0000 (13:51 +0000)
commit06b4164dfe269704976b52421edbbbdf3b345679
tree30593aae7b0fa609420b348938211b48544f5e21
parentd52d6f0cbe3cf377197a455b4d20b38c1d0858af
linux: Do not allow slab caches to be merged

From the kernel documentation:

> For reduced kernel memory fragmentation, slab caches can be
> merged when they share the same size and other characteristics.
> This carries a risk of kernel heap overflows being able to
> overwrite objects from merged caches (and more easily control
> cache layout), which makes such heap attacks easier to exploit
> by attackers. By keeping caches unmerged, these kinds of exploits
> can usually only damage objects in the same cache. [...]

Thus, it is more sane to leave slab merging disabled. KSPP and ClipOS
recommend this as well.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
config/kernel/kernel.config.aarch64-ipfire
config/kernel/kernel.config.armv6l-ipfire
config/kernel/kernel.config.riscv64-ipfire
config/kernel/kernel.config.x86_64-ipfire