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
stub: Add support for .ucode EFI addons #32463
base: main
Are you sure you want to change the base?
Conversation
bb24c9c
to
47459b8
Compare
Edit: This changed, see next comment |
I changed the order now and updated the initial comment to reflect that. I think the order makes more sense this way, is the same as with cmdline and devicetree addons, and also matches the measurement order. Let me know what you think. |
Important An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released. |
Hmm, so I guess the original idea is that since kernel stops on first match, and addons are the way to override/extend what's set in the UKI, we still need the ucodes in addons to have higher priorities. I'm not familiar with device trees, but for cmdline, the same option defined later overrides the former ones. So in that case appending what's from addon to the cmdline from UKI makes sense, but not so much for ucodes. |
cc @poettering |
Oh interesting point. I was thinking about how the final initrd filesystem looks like. But you make a good point, the initial cpio parser is more naive and will indeed stop on the first match. Alright, let me invert this again. Do you have opinions on the measurement question? I assume we want to measure things in the order they apply in the end? The embedded .ucode section is measured as part of the general UKI measurements, which is much earlier. I guess I will skip it there, and then measure it later, last, as part of the ucode cpio merging logic. |
Ok, I reworked it again. The order for microcode updates is now:
They are also measured in this order. The measurement part is a bit tricky and we might want to talk about it. Two things:
|
Hello!
This is the promised followup for #31872, and .ucode section support to addon files.
I implemented largely as discussed with @poettering here: uapi-group/specifications#98
We allow one
.ucode
section per UKI, and addon file and then merge them in the following order:UKI embedded .ucode sectionGlobal addonsUKI addonsNote this order is different from what was discussed in the thread above. The reason for that is that both cmdline and devicetree do it in this order, so I figured this is more consistent. (And makes sense IMHO, if one drops an addon file to change a (distro-)shipped UKI).This is now also aligned with the measurement order.[Edit]: This changed again, see below for context. The order is now UKI addons, Global addons, UKI embedded.