-
Notifications
You must be signed in to change notification settings - Fork 175
grub: add support for dynamic kernel cmdline via EFI variables #5216
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
Conversation
60aa7a2
to
1a0ff53
Compare
/rerun red |
2 similar comments
/rerun red |
/rerun red |
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.
We should also document the new way to configure the cmdline.
/rerun red |
1a0ff53
to
56be219
Compare
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.
I think it would make sense to add the script from the PR description into the EVE rootfs, so it's easily usable by users.
Also, I think change notes should also say that we add this nice feature.
|
||
FROM grub-build-base AS grub-build-amd64 | ||
ENV GRUB_MODULES="multiboot multiboot2 efi_uga efi_gop linuxefi gpt verify gcry_sha256 measurefs efinet" | ||
ENV GRUB_MODULES="multiboot multiboot2 efi_uga efi_gop linuxefi gpt verify gcry_sha256 measurefs efinet getenv" |
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.
And for ARM?
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.
- it is also for ARM. (forgot to fix commit description)
- end users should not use it imo
- script is just for testing, I did not make it erganomic. we can add one later
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.
@OhmSpectator you still think we should give end users a tool to modify this setting?
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.
I see it useful, but not necessary in this PR
- Add getenv module to GRUB modules for all EFI platforms - Implement set_append_extra_efi_cmdline function to read eve-kernel-extra-cmdline from EFI variables using GUID 7AD58F29-2B49-4F5A-9F0B-4E7BF7C2C311 - Append extra cmdline args to dom0_extra_args at boot time - Add copyright header and fix ENV syntax in Dockerfile - Allows runtime kernel parameter injection without modifying grub.cfg Security note: Dynamic cmdline modification is acceptable since grub.cfg is measured to PCR 8, maintaining boot integrity verification. Signed-off-by: Mikhail Malyshev <[email protected]>
- according to https://savannah.gnu.org/news/?id=10777 new mirrors should be used Signed-off-by: Mikhail Malyshev <[email protected]>
86bd6a6
to
bdf5ceb
Compare
Description
This functionality is required by Evaluation Eve to set kernel command line at run time to collect HW inventory with ACS override patch disabled but it can also be used for dynamic configuration of isolated CPUs for RT. In future we can push kernel command line parameters from a controller. The later may be useful to e.g. set
pci=realloc=off
or other arguments without hacking/config/grub.cfg
NOTE: @christoph-zededa @rene we recently got a lot "connection refused" from gnu.org. Here is the post where they introduce new mirrors https://savannah.gnu.org/news/?id=10777
List of changes:
Security note: Dynamic cmdline modification is acceptable since grub.cfg is measured to PCR 8, maintaining boot integrity verification.
How to test and validate this PR
Changelog notes
None
PR Backports
Checklist
I've provided a proper description
I've added the proper documentation
I've tested my PR on amd64 device
I've tested my PR on arm64 device
I've written the test verification instructions
I've set the proper labels to this PR
I've checked the boxes above, or I've provided a good reason why I didn't
check them.