Skip to content

slaunch: move TPM relinquish locality call after ExitBootServices#31

Open
accek-itl wants to merge 1 commit intoTrenchBoot:tb-devfrom
accek-itl:pr/tb-dev-b08a388a7
Open

slaunch: move TPM relinquish locality call after ExitBootServices#31
accek-itl wants to merge 1 commit intoTrenchBoot:tb-devfrom
accek-itl:pr/tb-dev-b08a388a7

Conversation

@accek-itl
Copy link
Copy Markdown

The grub_tpm_relinquish_locality(0) must be called before starting TXT, because Intel SINIT expects no locality active. But relinquishing it in grub_txt_boot_prepare is too early in EFI case - Linux kernel EFI stub did not run yet and it uses TPM for measured boot (non-DRTM, static root of trust).

This is fixed here by moving the call to the DL Stub.


Tested:

  • on grub-sl-2.12-v15 branch
  • on ThinkPad X1 Carbon 5th (20HRS11400), Core i7-7600U
    Fixes PCR 9 update errors shown when booting Linux with efi=debug and events show up in /sys/kernel/security/tpm0/binary_bios_measurements

The grub_tpm_relinquish_locality(0) must be called before starting TXT,
because Intel SINIT expects no locality active.  But relinquishing it in
grub_txt_boot_prepare is too early in EFI case - Linux kernel EFI stub
did not run yet and it uses TPM for measured boot (non-DRTM, static root
of trust).

This is fixed here by moving the call to the DL Stub.

Signed-off-by: Szymon "accek" Acedański <accek@invisiblethingslab.com>
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.

1 participant