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

overlord/fdestate: keep FDE state up to date #14516

Open
wants to merge 2 commits into
base: fde-manager-features
Choose a base branch
from

Conversation

valentindavid
Copy link
Contributor

@valentindavid valentindavid commented Sep 17, 2024

Ensure() initializes the empty profiles, and reseal updates them.

This is on top of #14400

@valentindavid valentindavid added the FDE Manager Pull requests that target FDE manager branch label Sep 17, 2024
@github-actions github-actions bot added the Run Nested -auto- Label automatically added in case nested tests need to be executed label Sep 17, 2024
@valentindavid valentindavid changed the title overlord/fdestate: Keep FDE state up to date overlord/fdestate: keep FDE state up to date Sep 17, 2024
@valentindavid valentindavid force-pushed the valentindavid/sync-fde-state branch 8 times, most recently from 36f5c11 to 96fe3c2 Compare September 20, 2024 10:41
@valentindavid valentindavid force-pushed the valentindavid/sync-fde-state branch 3 times, most recently from 2331c1f to 728ff63 Compare September 20, 2024 14:07
Ensure() initializes the empty profiles, and reseal updates them.
}
}

type KeyDigest struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might be a type that should be handled in secboot. And we just use json.RawMessage for it.

Comment on lines +61 to +64
if !locked {
m.state.Lock()
defer m.state.Unlock()
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not elegant. But I am not sure how to handle it correctly. We do resealing sometimes locked, sometimes not.

Copy link
Collaborator

Choose a reason for hiding this comment

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

do we know where is it called with the state really already unlocked?

Comment on lines +188 to +197
dataUUID, dataErr := disksDmCryptUUIDFromMountPoint(dirs.GlobalRootDir)
saveUUID, saveErr := disksDmCryptUUIDFromMountPoint(dirs.SnapSaveDir)
if errors.Is(saveErr, &disks.ErrMountPointNotFound{}) {
// TODO: do we need to care about old cases where there is no save partition?
return nil
}

if errors.Is(dataErr, disks.ErrNoDmUUID) && errors.Is(saveErr, disks.ErrNoDmUUID) {
return nil
}
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 think we should look at the sealing method with device.SealedKeysMethod instead.

@valentindavid valentindavid marked this pull request as ready for review September 20, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FDE Manager Pull requests that target FDE manager branch Run Nested -auto- Label automatically added in case nested tests need to be executed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants