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

[9.4-stable] Backport #3607 (eventlog entries from measure-config) #3657

Merged
merged 4 commits into from
Dec 11, 2023

Conversation

shjala
Copy link
Member

@shjala shjala commented Dec 7, 2023

This is backport of #3607 .

…Event

This commit introduces the following changes:

There is no need to hash the event string sent to PCREvent beforehand,
it will get hashed internally by all hash algorithms associated with
the PCR.

PCREvent accepts a maximum of 1024 bytes of event data, to comply
break down the event data into chunks of 1024, if the data is larger
than 1024 bytes.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
Don't loop over event data if is longer that 1024 bytes, truncate it and
just do it once. This helps with having one event per measurements.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
We are explicitly using tpm0 all over the place, so simplify the code by
removing parts that account for multiple tmp existing on the device and
just use tpm0 instead.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
Create a TCG formatted event log based on the measure-config measurements,
we append this file to the end of the system TPM event log when eve fails
to unlock the vault, this way we have more information about what possibly
went wrong.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

Do we need this for troubleshooting PCR differences? Or is there some other reasons for backporting it?

@shjala
Copy link
Member Author

shjala commented Dec 9, 2023

Yes, for troubleshooting PCR-14 mismatches, without these changes anything measure-config measures won't be part of the TPM event log.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

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

LGTM

@eriknordmark
Copy link
Contributor

The three yetus complaints are in unmodified code so ignoring them.

@eriknordmark eriknordmark merged commit 2d94ba0 into lf-edge:9.4-stable Dec 11, 2023
15 of 16 checks passed
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.

2 participants