-
Notifications
You must be signed in to change notification settings - Fork 153
Enabled hardening configs default to build. #1223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
ci/base.yml
Outdated
| IMAGE_FSTYPES += "qcomflash" | ||
| extra: | | ||
| DISTRO_FEATURES:append = " efi pni-names" | ||
| DISTRO_FEATURES:append = " efi pni-names hardened" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are enabling by default why distro feature is needed? Can't CONFIG_LIST be populated unconditionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opt-Out Support: The hardened feature remains configurable, allowing users to explicitly remove it from DISTRO_FEATURES if they choose to disable hardening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, any user not using Kas will not get hardened features? Why do we have them here then? We are not publishing binary images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged. updated and remove dependency on the hardened feature.
ci/base.yml
Outdated
| IMAGE_FSTYPES += "qcomflash" | ||
| extra: | | ||
| DISTRO_FEATURES:append = " efi pni-names" | ||
| DISTRO_FEATURES:append = " efi pni-names hardened" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, any user not using Kas will not get hardened features? Why do we have them here then? We are not publishing binary images.
5ab5518 to
0c8eae9
Compare
quaresmajose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to drop the hardening distro feature that doesn't seem to exist anywhere in all ohter layers.
f998ff5 to
e61e7c0
Compare
lumag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please write proper commit subject and message. For the subject you are changing particular recipe rather than full meta-qcom layer. Then please rewrite commit message into a normal English text, describing the issue that you are trying to solve and what is to be done (use imperative language).
Kernel builds currently lack default security hardening options. Add support to merge `hardening.config` during configuration using merge_config.sh. Introduce `KBUILD_CONFIG_EXTRA` (following KBUILD naming conventions) for internal kernel configs like hardening.config, keeping them separate from external fragments managed via SRC_URI. This ensures consistent hardening across builds. Signed-off-by: Abhilasha Manna <[email protected]>
e61e7c0 to
b63e07e
Compare
Updated commit message per suggestion |
quaresmajose
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. thanks
|
This seems to break building of kgsl-dlkm module. Could you please take a look, why? |
|
Interesting, wonder which new option is causing that for this module in particular. |
This would apply only to the debug package. |
No. This would mean that the builds are not binary-reproducible. So, NAK.
|
|
Yes, we need to understand what is causing TMPDIR to be exposed and see if we can fix the kernel or if we should fix the recipes, adding to INSANE_SKIP is not acceptable. |
This PR introduces support for merging hardening.config into the kernel configuration for linux-qcom-next.
The goal is to ensure that security hardening options are applied consistently across all builds.
What’s Changed
Added logic to include hardening.config during kernel configuration using merge_config.sh.
Introduced a new variable KBUILD_CONFIG_EXTRA (aligned with KBUILD naming conventions) to manage internal kernel configuration files like
hardening.config.Maintained separation between internal configs and external fragments (*.cfg) managed via SRC_URI.
Why This Change
Kernel builds previously lacked default hardening options, which could lead to reduced security.
This update ensures that compiler-based mitigations and other hardening features are applied by default.
Verification
verified build on QCS9100-ride-sx. Kernel configuration includes hardening options as expected.
Ref: 1201#issuecomment-3543906617