Skip to content

Commit 5258188

Browse files
author
Abhilasha Manna
committed
linux-qcom-next: 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 b3d953b commit 5258188

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

recipes-kernel/linux/linux-qcom-next/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-next_git.bb

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

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

0 commit comments

Comments
 (0)