Skip to content

Commit c8969ae

Browse files
committed
Unset CONFIG_STRICT_KERNEL_RWX in kernel configuration
This will reduce kernel size from ~21MiB to ~5MiB as it removes huge alignment sections in the linker script. For details, see symbol SECTION_ALIGN in arch/riscv/include/asm/set_memory.h and arch/riscv/kernel/vmlinux.lds.S It should be noted, however, that this might trade kernel binary load size for security in some settings.
1 parent dd88c7e commit c8969ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configs/linux.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ CONFIG_COMPAT_32BIT_TIME=y
325325
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
326326
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
327327
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
328-
CONFIG_STRICT_KERNEL_RWX=y
328+
CONFIG_STRICT_KERNEL_RWX=n
329329
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
330330
CONFIG_STRICT_MODULE_RWX=y
331331
# CONFIG_LOCK_EVENT_COUNTS is not set

0 commit comments

Comments
 (0)