Skip to content

Commit 6aeb796

Browse files
author
Abhilasha Manna
committed
linux-qcom-6.18: Enable hardening.config globally and override CONFIG_KSTACK_ERASE
Apply `hardening.config` to all builds by default to ensure consistent security hardening across builds. Override `CONFIG_KSTACK_ERASE=n` because enabling it introduces absolute workspace paths into out‑of‑tree (OOT) kernel modules. These leaked paths cause Yocto’s Package QA rule to falg as build error,since kernel modules must not contain host-specific build paths in shipping images. Signed-off-by: Abhilasha Manna <amanna@qti.qualcomm.com>
1 parent 5258188 commit 6aeb796

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

recipes-kernel/linux/linux-qcom-6.18/configs/bsp-additions.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,5 @@ CONFIG_NFT_TPROXY=m
314314
CONFIG_NFT_TUNNEL=m
315315
CONFIG_PACKET_DIAG=y
316316
CONFIG_VETH=m
317+
# Disable stack erase plugin to avoid buildpath leakage in out-of-tree modules
318+
CONFIG_KSTACK_ERASE=n

recipes-kernel/linux/linux-qcom_6.18.bb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ S = "${UNPACKDIR}/${BP}"
3939
KBUILD_DEFCONFIG ?= "defconfig"
4040
KBUILD_DEFCONFIG:qcom-armv7a = "qcom_defconfig"
4141

42-
KBUILD_CONFIG_EXTRA = "${@bb.utils.contains('DISTRO_FEATURES', 'hardened', '${S}/kernel/configs/hardening.config', '', d)}"
42+
KBUILD_CONFIG_EXTRA = "${S}/kernel/configs/hardening.config"
4343
KBUILD_CONFIG_EXTRA:append:aarch64 = " ${S}/arch/arm64/configs/prune.config"
4444
KBUILD_CONFIG_EXTRA:append:aarch64 = " ${S}/arch/arm64/configs/qcom.config"
4545
KBUILD_CONFIG_EXTRA:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '${S}/kernel/configs/debug.config', '', d)}"

0 commit comments

Comments
 (0)