]> asedeno.scripts.mit.edu Git - linux.git/commit
efi: Attempt to get the TCG2 event log in the boot stub
authorMatthew Garrett <mjg59@google.com>
Mon, 20 May 2019 20:55:01 +0000 (13:55 -0700)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 24 Jun 2019 20:57:49 +0000 (23:57 +0300)
commit6b0326190205603fa9b7fe1b05ff1f8fb22de266
tree62c1edf1644ce9b0d8255634a755649e246c9764
parentfe7eb0230c3dd95c947e18248808d7038c65f43e
efi: Attempt to get the TCG2 event log in the boot stub

Right now we only attempt to obtain the SHA1-only event log. The
protocol also supports a crypto agile log format, which contains digests
for all algorithms in use. Attempt to obtain this first, and fall back
to obtaining the older format if the system doesn't support it. This is
lightly complicated by the event sizes being variable (as we don't know
in advance which algorithms are in use), and the interface giving us
back a pointer to the start of the final entry rather than a pointer to
the end of the log - as a result, we need to parse the final entry to
figure out its length in order to know how much data to copy up to the
OS.

Signed-off-by: Matthew Garrett <mjg59@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Bartosz Szczepanek <bsz@semihalf.com>
Tested-by: Bartosz Szczepanek <bsz@semihalf.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/firmware/efi/libstub/tpm.c