Skip to content
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

Add secure fast/warm-reboot support for Aboot #994

Merged
merged 1 commit into from
Aug 5, 2020

Conversation

Staphylo
Copy link
Contributor

Instead of having multiple implementation of preparing a SWI image for
secureboot, fast-reboot now reuses boot0.
SWI images booting in regular mode will keep using the old behavior.

@qiluo-msft
Copy link
Contributor

qiluo-msft commented Jul 17, 2020

Could you change the title to "Add secure fast-reboot and warm-reboot support for Aboot" if this is true? #Closed

BOOT_OPTIONS="$(cat "$IMAGE_PATH/kernel-cmdline" | tr '\n' ' ') SONIC_BOOT_TYPE=${BOOT_TYPE_ARG}"
if is_secureboot; then
KERNEL_IMAGE=""
BOOT_OPTIONS="SONIC_BOOT_TYPE=${BOOT_TYPE_ARG}"
Copy link
Contributor

@qiluo-msft qiluo-msft Jul 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" [](start = 58, length = 1)

" [](start = 58, length = 1)

Will you add secure_boot_enable=1 into BOOT_OPTIONS?

This is also applied to non-aboot secure boot flow. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the loading of the kernel and initramfs is done through boot0 the secure_boot_enable=1 option is added automatically. Adding it here would be redundant but harmless.
Let me know if you still want me to add it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help added it. This code will be shared to non-aboot secure boot flow which using kexec.

I guess the aboot has the intelligence to keep single secure_boot_enable=1 if there is already one. There is no need to duplicate it on cmdline.


In reply to: 456649028 [](ancestors = 456649028)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make the change.
The option will likely be duplicated by boot0 since but there's no harm in it.
Also this code will not be used by other vendors since it contained in a if aboot_platform.
It makes this change rather useless if the only hope was to have other vendors reuse it.

scripts/fast-reboot Outdated Show resolved Hide resolved
scripts/fast-reboot Outdated Show resolved Hide resolved
@Staphylo Staphylo marked this pull request as ready for review July 21, 2020 09:56
@Staphylo
Copy link
Contributor Author

retest this please

@jleveque
Copy link
Contributor

Retest this please

yxieca
yxieca previously approved these changes Jul 24, 2020
@jleveque
Copy link
Contributor

Retest this please

@qiluo-msft
Copy link
Contributor

Does this PR works for warm-reboot, in theory?


In reply to: 660299771 [](ancestors = 660299771)

@Staphylo
Copy link
Contributor Author

Staphylo commented Aug 4, 2020

Yes this PR works for both fast-reboot and warm-reboot.

Instead of having multiple implementation of preparing a SWI image for
secureboot, fast-reboot now reuses boot0.
SWI images booting in regular mode will keep using the old behavior.
@qiluo-msft qiluo-msft changed the title Add secure fast-reboot support for Aboot Add secure fast/warm-reboot support for Aboot Aug 4, 2020
@qiluo-msft
Copy link
Contributor

Retest this please

@qiluo-msft qiluo-msft merged commit 8e64106 into sonic-net:master Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants