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

tdx-measure: assemble Boot0000 by hand #893

Merged
merged 1 commit into from
Sep 30, 2024
Merged

tdx-measure: assemble Boot0000 by hand #893

merged 1 commit into from
Sep 30, 2024

Conversation

Freax13
Copy link
Contributor

@Freax13 Freax13 commented Sep 27, 2024

It's always nicer to see how a value is constructed/structured rather than just hard-coding it. Now that we know how that value is derived, we can also be more confident that it won't change in the future (it's mostly comprised of constants).

@Freax13 Freax13 added the no changelog PRs not listed in the release notes label Sep 27, 2024
@Freax13 Freax13 force-pushed the tom/boot0000 branch 2 times, most recently from a5dca35 to f4e42a7 Compare September 27, 2024 12:29
return buffer.Bytes(), nil
}

// buildEfiLoadOption assembles the EFI_LOAD_OPTION passed by QEMU for boot option Boot0000.
Copy link
Contributor

Choose a reason for hiding this comment

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

How did you figure this out - is it documented somewhere or does one need to read the source to understand what's happening? Can we leave some references in case this changes with future qemu releases?

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 looked at the UEFI and PI specs and dissected the bytes manually. The constants are found in both QEMU and OVMF, so I don't think QEMU changing them is even possible without breaking older OVMFs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks - do you think we could link the relevant parts?

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 added some spec links for the data structures.

It's always nicer to see how a value is constructed/structured rather
than just hard-coding it. Now that we know how that value is derived,
we can also be more confident that it won't change in the future (it's
mostly comprised of constants).
@Freax13 Freax13 merged commit 01dc66f into main Sep 30, 2024
19 checks passed
@Freax13 Freax13 deleted the tom/boot0000 branch September 30, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog PRs not listed in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants