]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
efi/libstub: Use TPM event typedefs from the TCG PC Client spec
authorArd Biesheuvel <ardb@kernel.org>
Fri, 8 Mar 2024 08:17:07 +0000 (09:17 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 9 Mar 2024 10:36:54 +0000 (11:36 +0100)
commit3e0b0f880e9e8f39f433dc6734cff035f9de2c8e
tree0c564081c054e8eb4a94dc2cf5e8a777d32a4517
parent841c35169323cd833294798e58b9bf63fa4fa1de
efi/libstub: Use TPM event typedefs from the TCG PC Client spec

Our efi_tcg2_tagged_event is not defined in the EFI spec, but it is not
a local invention either: it was taken from the TCG PC Client spec,
where it is called TCG_PCClientTaggedEvent.

Note that this spec also contains some guidance on how to populate it,
which is not being followed closely at the moment; it claims that the
event size should cover the TCG_PCClientTaggedEvent and its payload
only, but it currently covers the preceding efi_tcg2_event too.

However, this directly contradicts the TCG EFI protocol specification,
which states very clearly that the event size should cover the entire
data structure, including the leading efi_tcg2_event_t struct.

So rename the struct and document its provenance, but retain the
existing logic to populate the size field.

Link: https://lore.kernel.org/all/20240308085754.476197-8-ardb+git@google.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub-helper.c
drivers/firmware/efi/libstub/efistub.h