efi/secureboot.go: automatically detect deployedmode variable measurement#546
Closed
valentindavid wants to merge 1 commit intocanonical:masterfrom
Closed
efi/secureboot.go: automatically detect deployedmode variable measurement#546valentindavid wants to merge 1 commit intocanonical:masterfrom
valentindavid wants to merge 1 commit intocanonical:masterfrom
Conversation
…ment e25b821 (canonical#508) regressed the fix from 1e93244 (canonical#497). We need to read the event log for Ubuntu Core systems because we do not use the pre-install checks. So here we instead provide a `WithAutoAllowSecureBootUserMode()` that can be called unconditionally on Core system and let the profile be calculated depdending what is in the event log.
pedronis
reviewed
Apr 30, 2026
| switch { | ||
| case e.PCRIndex == internal_efi.SecureBootPolicyPCR && e.EventType == tcglog.EventTypeEFIVariableDriverConfig: | ||
| if data, ok := e.Data.(*tcglog.EFIVariableData); ok { | ||
| if data.VariableName == efi.GlobalVariable && data.UnicodeName == "AuditMode" { |
Collaborator
There was a problem hiding this comment.
it's enough to check one of the two vars?
| func (o autoAllowSecureBootUserModeOption) ApplyOptionTo(visitor internal_efi.PCRProfileOptionVisitor) error { | ||
| visitor.AddImageLoadParams(func(params ...loadParams) []loadParams { | ||
| var out []loadParams | ||
| for _, v := range []bool{false, true} { |
Collaborator
There was a problem hiding this comment.
why do we need to set both to true and false, in case the firmware behavior changes?
Member
Author
|
We might not need it. We still have a branch where the option is false. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e25b821 (#508) regressed the fix from 1e93244 (#497). We need to read the event log for Ubuntu Core systems because we do not use the pre-install checks. So here we instead provide a
WithAutoAllowSecureBootUserMode()that can be called unconditionally on Core system and let the profile be calculated depdending what is in the event log.