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

initdata: measure initdata digest into rt register #1999

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

mkulke
Copy link
Contributor

@mkulke mkulke commented Aug 12, 2024

This adds two post exec directives for process-user-data in the mkosi to extend PCR 8 (grub, which we don't use it mkosi podvms: https://uapi-group.org/specifications/specs/linux_tpm_pcr_registry/) with the digest of initdata. Sha256 and Sha384 banks are attempted. initdata.digest contains a hex value that will fit only in one of those. A failure of either post exec step will be ignored and do not turn the unit status into a failure.

This is a bit provisional, but since things with init-data and runtime measurement are a bit in flux still, which doesn't warrant to put such logic in code yet.

Copy link

@huoqifeng huoqifeng left a comment

Choose a reason for hiding this comment

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

LGTM
as A failure of either post exec step will be ignored and do not turn the unit status into a failure, thanks @mkulke

This adds two post exec directives for process-user-data in the mkosi to
extend PCR 8 (grub, which we don't use it mkosi podvms:
https://uapi-group.org/specifications/specs/linux_tpm_pcr_registry/)
with the digest of initdata. Sha256 and Sha384 banks are attempted.
initdata.digest contains a hex value that will fit only in one of those.
A failure of either post exec step will be ignored and do not turn the
unit status into a failure.

This is a bit provisional, but since things with init-data and runtime
measurement are a bit in flux still, which doesn't warrant to put such
logic in code yet.

Drive-by fix: Updated the azure nightly badge on the Readme

Signed-off-by: Magnus Kulke <[email protected]>
Copy link
Member

@liudalibj liudalibj left a comment

Choose a reason for hiding this comment

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

LGTM

@mkulke mkulke merged commit d3643bf into confidential-containers:main Aug 13, 2024
20 checks passed
@mkulke mkulke deleted the mkulke/measure-initdata branch August 13, 2024 07:42
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