[RFC cip-dev][isar-cip-core][PATCH 06/14] Apply hardening configuration to the kernel
Quirin Gylstorff <[email protected]> Fri, 24 Jul 2026 14:39:08 +0200
| Newsgroups | org.cip-project.lists.cip-dev |
|---|---|
| Message-ID | <[email protected]> |
From: Quirin Gylstorff <[email protected]> Use the provided kernel hardening configuration options in the kernel build. Co-Authored-by: Felix Moessbauer <[email protected]> Co-Authored-by: Christoph Steiger <[email protected]> Signed-off-by: Quirin Gylstorff <[email protected]> --- recipes-kernel/linux/kernel-hardening.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 recipes-kernel/linux/kernel-hardening.inc diff --git a/recipes-kernel/linux/kernel-hardening.inc b/recipes-kernel/linux/kernel-hardening.inc new file mode 100644 index 0000000..2b22fca --- /dev/null +++ b/recipes-kernel/linux/kernel-hardening.inc @@ -0,0 +1,16 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens AG, 2026 +# +# SPDX-License-Identifier: MIT + +OVERRIDES:append = "${@'kernel-hardening' if bb.utils.to_boolean(d.getVar('CIP_CIS_HARDENING')) else ''}" + +KERNEL_CONFIG_FRAGMENTS:kernel-hardening += "hardening.kernel.cfg" + +do_dpkg_source[depends] += "${@'cip-cis-rules-config:do_deploy_hardening' if bb.utils.to_boolean(d.getVar('CIP_CIS_HARDENING')) else ''}" + +do_dpkg_source:prepend:kernel-hardening() { + cp ${DEPLOY_DIR_IMAGE}/${DISTRO}-hardening.kernel.cfg ${WORKDIR}/hardening.kernel.cfg +} -- 2.53.0