On 8/6/22 03:00, Peter Müller wrote:
> Hello *,
>
> any vetoes / endorsements of this? :-)
>
> Thanks, and best regards,
> Peter Müller
>
>>  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(a)ipfire.org>
>> ---
>>   config/kernel/kernel.config.aarch64-ipfire | 2 +-
>>   config/kernel/kernel.config.armv6l-ipfire  | 2 +-
>>   config/kernel/kernel.config.riscv64-ipfire | 2 +-
>>   config/kernel/kernel.config.x86_64-ipfire  | 2 +-
>>   4 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/config/kernel/kernel.config.aarch64-ipfire b/config/kernel/kernel.config.aarch64-ipfire
>> index 9232335ff..023c3d5aa 100644
>> --- a/config/kernel/kernel.config.aarch64-ipfire
>> +++ b/config/kernel/kernel.config.aarch64-ipfire
>> @@ -247,7 +247,7 @@ CONFIG_VM_EVENT_COUNTERS=y
>>   # CONFIG_SLAB is not set
>>   CONFIG_SLUB=y
>>   # CONFIG_SLOB is not set
>> -CONFIG_SLAB_MERGE_DEFAULT=y
>> +# CONFIG_SLAB_MERGE_DEFAULT is not set
>>   CONFIG_SLAB_FREELIST_RANDOM=y
>>   CONFIG_SLAB_FREELIST_HARDENED=y
>>   CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
>> diff --git a/config/kernel/kernel.config.armv6l-ipfire b/config/kernel/kernel.config.armv6l-ipfire
>> index dc0aee51b..b4587826e 100644
>> --- a/config/kernel/kernel.config.armv6l-ipfire
>> +++ b/config/kernel/kernel.config.armv6l-ipfire
>> @@ -250,7 +250,7 @@ CONFIG_VM_EVENT_COUNTERS=y
>>   # CONFIG_SLAB is not set
>>   CONFIG_SLUB=y
>>   # CONFIG_SLOB is not set
>> -CONFIG_SLAB_MERGE_DEFAULT=y
>> +# CONFIG_SLAB_MERGE_DEFAULT is not set
>>   CONFIG_SLAB_FREELIST_RANDOM=y
>>   CONFIG_SLAB_FREELIST_HARDENED=y
>>   CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
>> diff --git a/config/kernel/kernel.config.riscv64-ipfire b/config/kernel/kernel.config.riscv64-ipfire
>> index 0801f4389..fb7cda4dd 100644
>> --- a/config/kernel/kernel.config.riscv64-ipfire
>> +++ b/config/kernel/kernel.config.riscv64-ipfire
>> @@ -230,7 +230,7 @@ CONFIG_VM_EVENT_COUNTERS=y
>>   # CONFIG_SLAB is not set
>>   CONFIG_SLUB=y
>>   # CONFIG_SLOB is not set
>> -CONFIG_SLAB_MERGE_DEFAULT=y
>> +# CONFIG_SLAB_MERGE_DEFAULT is not set
>>   CONFIG_SLAB_FREELIST_RANDOM=y
>>   CONFIG_SLAB_FREELIST_HARDENED=y
>>   CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
>> diff --git a/config/kernel/kernel.config.x86_64-ipfire b/config/kernel/kernel.config.x86_64-ipfire
>> index 40975b5fc..d3792cbb7 100644
>> --- a/config/kernel/kernel.config.x86_64-ipfire
>> +++ b/config/kernel/kernel.config.x86_64-ipfire
>> @@ -270,7 +270,7 @@ CONFIG_VM_EVENT_COUNTERS=y
>>   # CONFIG_SLAB is not set
>>   CONFIG_SLUB=y
>>   # CONFIG_SLOB is not set
>> -CONFIG_SLAB_MERGE_DEFAULT=y
>> +# CONFIG_SLAB_MERGE_DEFAULT is not set
>>   CONFIG_SLAB_FREELIST_RANDOM=y
>>   CONFIG_SLAB_FREELIST_HARDENED=y
>>   CONFIG_SHUFFLE_PAGE_ALLOCATOR=y

I have no expertise.  I would defer to the opinion expressed in the 
documentation.