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

feat: minimal poc for TPM measurements à la sd-stub #167

Merged
merged 2 commits into from
May 18, 2023

Conversation

RaitoBezarius
Copy link
Member

@RaitoBezarius RaitoBezarius commented Apr 29, 2023

Depends on #166.
Implements TPM part of #94.

Note to maintainers & reviewers

Lanzaboote customization requires a special handling of PCR11 measurements to include kernel and initrd properly.
To do this, we need to read the kernel and the initrd guarded with our hashes, then record them as "fake unified section" or measure them somewhere else.

This way, we can slowly recover lanzaboote as a "true UKI" in terms of semantics.

This is out of scope for this PR, but will done in #169 because they do bring the necessary infrastructure wrt to UnifiedSection to perform this.

rust/stub/src/main.rs Outdated Show resolved Hide resolved
@blitz
Copy link
Member

blitz commented May 4, 2023

@RaitoBezarius It would be helpful to have a call one of these days about what's going on in these PRs to give some overview information. :)

@RaitoBezarius
Copy link
Member Author

@RaitoBezarius It would be helpful to have a call one of these days about what's going on in these PRs to give some overview information. :)

When are you available :) ?

@RaitoBezarius RaitoBezarius marked this pull request as ready for review May 5, 2023 19:53
@RaitoBezarius RaitoBezarius force-pushed the sd-stub-tpm2 branch 2 times, most recently from 3309f45 to 9549253 Compare May 14, 2023 17:13
@RaitoBezarius
Copy link
Member Author

I met with @nikstur on the last NixOS Munich meetup and we discussed this PR.

Copy link
Member

@nikstur nikstur left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you for the work!

I'd love

  • a nice commit message
  • the code formatted with cargo fmt

Only the code formatting is a blocker for me.

rust/stub/src/main.rs Outdated Show resolved Hide resolved
rust/stub/src/main.rs Show resolved Hide resolved
@RaitoBezarius
Copy link
Member Author

Awesome, will fix the code formatting. :)

@RaitoBezarius RaitoBezarius force-pushed the sd-stub-tpm2 branch 2 times, most recently from 3766b42 to 996a3b6 Compare May 18, 2023 13:56
@nikstur
Copy link
Member

nikstur commented May 18, 2023

Should we merge #177 first? This might make formatting easier and the diff easier to read.

@RaitoBezarius
Copy link
Member Author

RaitoBezarius commented May 18, 2023 via email

@RaitoBezarius
Copy link
Member Author

OVMF has no TPM support compiled by default, I am fixing that.

@RaitoBezarius RaitoBezarius force-pushed the sd-stub-tpm2 branch 2 times, most recently from 64e32a8 to bd4e428 Compare May 18, 2023 16:34
@RaitoBezarius
Copy link
Member Author

Formatted and test fixed now.

Test that our measurements exposes a TPM PCR index in the userspace
through efivarfs.
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.

4 participants