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

Support older OpenVMM logic for SECURE_BOOT #209

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mebersol
Copy link
Collaborator

Don't change the attributes on SECURE_BOOT until all deployed images have the ability to rewrite variable attributes.

@mebersol mebersol requested a review from a team as a code owner October 29, 2024 18:49
@daprilik
Copy link
Contributor

When does this mismatch occur? Is this servicing related? i.e: since servicing doesn't update the UEFI components in the context of the guest?

@mebersol
Copy link
Collaborator Author

When does this mismatch occur? Is this servicing related? i.e: since servicing doesn't update the UEFI components in the context of the guest?

If an OpenHCL with the current code creates an NVRAM store, and then an older OpenHCL (without my recent fix) that expects SECURE_BOOT to carry the NV attribute tries to open that store, it will fail because attributes mismatch.

@jstarks
Copy link
Member

jstarks commented Oct 29, 2024

Why are volatile variables being persisted to the NVRAM store?

@jstarks
Copy link
Member

jstarks commented Oct 29, 2024

(I think I asked this in another context and didn't see follow up to look for a response. Sorry if you answered this once already.)

@daprilik
Copy link
Contributor

When does this mismatch occur? Is this servicing related? i.e: since servicing doesn't update the UEFI components in the context of the guest?

If an OpenHCL with the current code creates an NVRAM store, and then an older OpenHCL (without my recent fix) that expects SECURE_BOOT to carry the NV attribute tries to open that store, it will fail because attributes mismatch.

Talking offline, Mike pointed out that this scenario is currently possible in a variety of cases, both via runtime servicing (in downgrade scenarios), or offline migration of OpenHCL-based VMs from uplevel to downlevel versions.

I think this is a reasonable workaround to the issue at hand, though I'd be remiss not to once again express hesitation at this sort of precarious back-compat situation we keep finding ourselves in 😅


As for your comment @jstarks, I'll leave Mike to offer UEFI-internals / historical context that I don't have.

@mebersol
Copy link
Collaborator Author

mebersol commented Oct 29, 2024

(I think I asked this in another context and didn't see follow up to look for a response. Sorry if you answered this once already.)

yeah, see #157 (comment)

@jstarks
Copy link
Member

jstarks commented Oct 30, 2024

yeah, see #157 (comment)

Thanks. Continuing that discussion here... how does real hardware work? I.e., how do these variables get set in Project Mu by default?

@mebersol
Copy link
Collaborator Author

yeah, see #157 (comment)

Thanks. Continuing that discussion here... how does real hardware work? I.e., how do these variables get set in Project Mu by default?

The answer is "it depends". In some cases, these get populated in firmware from other sources. In other cases, implementations ignore the spec (e.g. Sean was surprised the dbDefault was marked as volatile, it was done because it's the only way to say 'read-only'). I'd like to merge this now, and we have a plan for at least secure boot enablement going forward (will require changes to mu_msvmpkg first).

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.

3 participants