Skip to content

RFC efi/libstub: measurement initrd data loaded by the EFI stub

Ard Biesheuvel linux-efi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7efi/libstub: whitespace cleanupinclude/linux/efi.h+2 -20 replies
2/7efi/libstub: fix prototype of efi_tcg2_protocol::get_event_log()drivers/firmware/efi/libstub/efistub.h+1 -10 replies
3/7efi/libstub: x86/mixed: increase supported argument countarch/x86/boot/compressed/efi_thunk_64.S arch/x86/include/asm/efi.h arch/x86/platform/efi/efi_thunk_64.S+30 -130 replies
4/7efi/libstub: move TPM related prototypes into efistub.hdrivers/firmware/efi/libstub/efistub.h include/linux/efi.h+9 -90 replies
5/7efi/libstub: add prototype of efi_tcg2_protocol::hash_log_extend_event()arch/x86/include/asm/efi.h drivers/firmware/efi/libstub/efistub.h+25 -10 replies
6/7efi/libstub: consolidate initrd handling across architecturesdrivers/firmware/efi/libstub/efi-stub-helper.c drivers/firmware/efi/libstub/efi-stub.c drivers/firmware/efi/libstub/efistub.h +1 more+21 -290 replies
7/7efi/libstub: measure loaded initrd info into the TPMdrivers/firmware/efi/libstub/efi-stub-helper.c+40 -131 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/7] efi/libstub: measurement initrd data loaded by the EFI stub

This series enables measurement of the initrd data loaded directly by the EFI stub into the TPM, using the TCG2 protocol exposed by the firmware (if available). This ensures that the initrd observed and used by the OS is the same one that got measured into the TPM, which is more difficult to guarantee in the current situation.

This is posted as an RFC since it is mostly an invitation to discuss how we can fit this into a longer term strategy for arch-agnostic secure and measured boot that does not hinge on the Shim+GRUB tandem, or on deep knowledge on the part of the bootloader regarding device trees, bootparams structs, allocation and placement policies of various artifacts etc etc

Open questions:
- Should we do this?
- Are Linux systems in the field using PCR value prediction when updating the initrd? Does this approach interfere with that?
- Which PCR and event type to use
- Is a separator event needed here, given that the initrd measurement is recorded even if no initrd was loaded by the stub?

Note that the EFI stub ignores the initrd provided directly via bootparams or the device tree, and it would be nice if we could keep doing that.

Build tested only.

Cc Peter Jones <[email protected]>
Cc Leif Lindholm <[email protected]>
Cc Arvind Sankar <[email protected]>
Cc Matthew Garrett <[email protected]>
Cc Daniel Kiper <[email protected]>
Cc Ilias Apalodimas <[email protected]>

Ard Biesheuvel (7):
efi/libstub: whitespace cleanup
efi/libstub: fix prototype of efi_tcg2_protocol::get_event_log() efi/libstub: x86/mixed: increase supported argument count efi/libstub: move TPM related prototypes into efistub.h efi/libstub: add prototype of
efi_tcg2_protocol::hash_log_extend_event()
efi/libstub: consolidate initrd handling across architectures efi/libstub: measure loaded initrd info into the TPM

 arch/x86/boot/compressed/efi_thunk_64.S       | 17 ++++--
 arch/x86/include/asm/efi.h                    | 13 +++--
 arch/x86/platform/efi/efi_thunk_64.S          | 17 ++++--
 .../firmware/efi/libstub/efi-stub-helper.c    | 56 +++++++++++++++----
 drivers/firmware/efi/libstub/efi-stub.c       | 10 +---
 drivers/firmware/efi/libstub/efistub.h        | 34 ++++++++++-
 drivers/firmware/efi/libstub/x86-stub.c       | 26 ++++-----
 include/linux/efi.h                           | 13 +----
 8 files changed, 123 insertions(+), 63 deletions(-)
Signature · 1 line
2.17.1