Skip to content

Commit 66a68b0

Browse files
committed
ARM: config: aspeed: Enable hardened allocator feature
SLAB_FREELIST_HARDENED can protect from freelist overwrite attacks with really small overhead. It works best with the SLUB allocator, so make SLUB the default by removing SLAB=y. total used free shared buff/cache available SLAB 425596 44065.3+/-220 311099+/-3800 14864+/-3900 70432+/-3700 352767+/-3900 SLUB 425592 44225.3+/-280 313275+/-600 12132+/-3.3 68092+/-530 355295+/-280 These figures are the average memory usage from three boots of each option in qemu, running the Romulus userspace. The output is from free(1), reported in kilobytes. Signed-off-by: Joel Stanley <[email protected]> Reviewed-by: Andrew Jeffery <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joel Stanley <[email protected]>
1 parent 2734d6c commit 66a68b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm/configs/aspeed_g4_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ CONFIG_BPF_SYSCALL=y
1818
CONFIG_EMBEDDED=y
1919
CONFIG_PERF_EVENTS=y
2020
# CONFIG_COMPAT_BRK is not set
21-
CONFIG_SLAB=y
2221
CONFIG_SLAB_FREELIST_RANDOM=y
22+
CONFIG_SLAB_FREELIST_HARDENED=y
2323
# CONFIG_ARCH_MULTI_V7 is not set
2424
CONFIG_ARCH_ASPEED=y
2525
CONFIG_MACH_ASPEED_G4=y

arch/arm/configs/aspeed_g5_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ CONFIG_BPF_SYSCALL=y
1818
CONFIG_EMBEDDED=y
1919
CONFIG_PERF_EVENTS=y
2020
# CONFIG_COMPAT_BRK is not set
21-
CONFIG_SLAB=y
2221
CONFIG_SLAB_FREELIST_RANDOM=y
22+
CONFIG_SLAB_FREELIST_HARDENED=y
2323
CONFIG_ARCH_MULTI_V6=y
2424
CONFIG_ARCH_ASPEED=y
2525
CONFIG_MACH_ASPEED_G5=y

0 commit comments

Comments
 (0)