efi/libstub: Measure into CC protocol if TCG2 protocol is absent
authorArd Biesheuvel <ardb@kernel.org>
Mon, 4 Mar 2024 09:40:24 +0000 (10:40 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 9 Mar 2024 10:37:15 +0000 (11:37 +0100)
commitac93cbfc2a2c8e9641a4b49cd1e7b9d34f935e1a
tree120a262dbadddf9a109c496f3465400922802a74
parent0bbe5b0ea97aaaea6387bab89919a8654b07df27
efi/libstub: Measure into CC protocol if TCG2 protocol is absent

To accommodate confidential compute VMs that expose the simplified CC
measurement protocol instead of the full-blown TCG2 one, fall back to
the former if the latter does not exist.

The CC protocol was designed to be used in this manner, which is why the
types and prototypes have been kept the same where possible. So reuse
the existing code, and only deviate from the TCG2 code path where
needed.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub-helper.c