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

Import SLRT support for secure launch #13

Merged
merged 3 commits into from
Nov 8, 2023

Conversation

SergiiDmytruk
Copy link
Member

@SergiiDmytruk SergiiDmytruk commented Oct 10, 2023

This addresses TrenchBoot/trenchboot-issues#17

Commits were cherry-picked according to TrenchBoot/trenchboot-issues#17 (comment) with minor modifications where necessary (bugs, typos, compilation warnings/errors). grub-sl-fc-38-dlstub contains several more patches related to code reorganization and EFI, these were not included.

The changes weren't tested.

sinit_acm_base -> dce_base
sinit_acm_size -> dce_size

"sinit_acm" is Intel-specific.  DCE stands for Dynamic Configuration
Environment and ACM is considered to be a DCE.

Signed-off-by: Ross Philipson <ross.philipson@oracle.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Copy link
Member

@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.

I've left some comments. Most of them are hints for the next steps in separate PRs, but there are some typos and NULL check that should probably be addressed here.

grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
include/grub/slr_table.h Show resolved Hide resolved
include/grub/slr_table.h Outdated Show resolved Hide resolved
Copy link
Member Author

@SergiiDmytruk SergiiDmytruk left a comment

Choose a reason for hiding this comment

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

I didn't squash commits yet so it's easier to see differences. See https://github.com/TrenchBoot/grub/compare/366d53cf8f4cb9af5aa01508ded0564b5357f70d..f18f1e3be for changes in top commit and d6d6a8d with 5643097 for larger changes.

There are no more gaps or fixed size of policy entries. Things are added to the list dynamically from different places. This required making callers of grub_txt_boot_prepare() responsible for finishing building SLRT.

Copy link
Member

@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.

Most of the comments are for different addresses before and after relocator, some of them were already present in the previous phase.

grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
grub-core/loader/i386/slaunch.c Outdated Show resolved Hide resolved
grub-core/loader/i386/slaunch.c Outdated Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
grub-core/loader/i386/txt/txt.c Outdated Show resolved Hide resolved
Provide definitions of structures and basic functions for constructing
and parsing of SLRT.

Signed-off-by: Ross Philipson <ross.philipson@oracle.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Ross Philipson <ross.philipson@oracle.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
@krystian-hebel krystian-hebel merged commit d77df30 into intel-txt-aem-2.06 Nov 8, 2023
1 check passed
@krystian-hebel krystian-hebel deleted the intel-txt-aem-slrt branch November 8, 2023 14:02
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