Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[202205] Add Secure Boot Kernel configuration #310

Merged
merged 3 commits into from
Mar 24, 2023

Conversation

sacnaik
Copy link

@sacnaik sacnaik commented Mar 15, 2023

Backporting #298, the kernel module signing/verification support from the master branch.

These patches are needed to enable secure boot on the 202205 branch.

The change also includes additional patches which are added in manage-config to apply #298 patch without any issues and as a dependent patch.

See
sonic-buildimage PR link: sonic-net/sonic-buildimage#12692
HLD: sonic-net/SONiC#1028

saiarcot895 and others added 3 commits March 14, 2023 19:53
Fix setting a config value in kconfig-inclusions when there's already a
conflicting existing value in defconfig.

For example, setting CONFIG_SYSTEM_TRUSTED_KEYS would have no effect,
because there would already be a setting for this specified by Debian's
default config.

With this, it _might_ be possible to remove the need for
kconfig-force-inclusions, but that still needs to be checked.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Becuase of kpatch-inclusions having quotes around the string, but the
value from `scripts/config` having the quotes stripped, the comparison
fails due to one side having quotes but the other side not having
quotes.

This effectively adds support for setting string kconfigs in
kconfig-inclusion.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
* [secure boot]Add Linux Kernel configuration to support Secure Boot feature & Secure warmboot

* [secure boot]Fix few typos

* [secure boot]Fix Secure boot build flag condition by adding an extra defined verification

* [secure boot]Remove WA after the fix in commit 5717c5d. The flow now will modify the kconfig-inclusions/exclusions file if the Secure Boot is enabled only.

* [secure boot]Add secure boot kernel config by using kconfig-secure-boot-exclusions and patch/kconfig-secure-boot-inclusions files with manage-config.

* [secure boot]removed comment, rename certificate with the name of the default debian key path.

* [secure boot]Fix equal condition and add input file validation to certificate

* [secure boot]Add signature force flag in kernel config, to force kernel module verification

---------

Co-authored-by: Saikrishna Arcot <sarcot@microsoft.com>
@paulmenzel
Copy link
Contributor

Please update the merge/pull request message summary/title.

@rlhui rlhui requested a review from saiarcot895 March 15, 2023 16:14
@rlhui
Copy link
Contributor

rlhui commented Mar 15, 2023

@davidpil2002 , please help review

@sacnaik
Copy link
Author

sacnaik commented Mar 16, 2023

@paulmenzel, Sorry it's not clear to me "Please update the merge/pull request message summary/title."
Are you saying the update is needed on the conversation tab?? also not clear what info needs to be updated.

@paulmenzel
Copy link
Contributor

I mean the title Sachnaik/kosigning. There is an edit button next to it on the right side. Maybe use:

[202205] Add Secure Boot Kernel configuration

@sacnaik sacnaik changed the title Sachnaik/kosigning [202205] Add Secure Boot Kernel configuration Mar 16, 2023
@sacnaik
Copy link
Author

sacnaik commented Mar 16, 2023

Thanks. Updated it.

@saiarcot895 saiarcot895 merged commit 836aedf into sonic-net:202205 Mar 24, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants