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

Disable TPM2 PCR banks which aren't used by coreboot #546

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

SergiiDmytruk
Copy link
Member

@SergiiDmytruk SergiiDmytruk commented Aug 8, 2024

coreboot can only extend a single PCR bank of TPM2 and this change results in all available PCRs being extended.

This is implemented by passing hash mask to EDK2 because coreboot would need to implement TPM2_PCR_Allocate command to select PCR banks on its own while EDK already has it. We're also primarily interested in solving this for EDK2 case anyway.

This affects all Dasharo EDK2 boards, but can be limited to selected ones if some negative side-effects are expected.

See Dasharo/dasharo-issues#982 for context.

EDK PR: Dasharo/edk2#160

Change-Id: I7117aa165596ea3b25d7582ebdad3a8591a72f38
Signed-off-by: Sergii Dmytruk <[email protected]>
@miczyg1
Copy link
Contributor

miczyg1 commented Aug 9, 2024

So, we expect to have the correct PCR banks allocated after a reboot (after EDK2 disables the banks we don't want to have) ?

@SergiiDmytruk
Copy link
Member Author

There is a cold reboot to reconfigure TPM which EDK does automatically if active PCR banks don't match build-time configuration. The user should never see unsupported PCRs being enabled, if that's what you're asking.

coreboot can only extend a single PCR bank of TPM2 and this change
results in all available PCRs being extended.

This is an alternative to making coreboot extend all active PCRs.

Change-Id: I4e21ab77f191e9b36cb467cd61ad0a3e347035cb
Signed-off-by: Sergii Dmytruk <[email protected]>
Copy link
Contributor

@krystian-hebel krystian-hebel left a comment

Choose a reason for hiding this comment

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

Approved, Dasharo/edk2#139 must be merged before this can land on dasharo.

@krystian-hebel krystian-hebel merged commit 1cb3194 into combined-eventlog Aug 14, 2024
1 check passed
@krystian-hebel krystian-hebel deleted the single-tpm2-pcr-bank branch August 14, 2024 15:31
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