Re: [RFC PATCH] tpm: only set efi_tpm_final_log_size after successful event log parsing

From: Jerry Snitselaar
Date: Mon Sep 23 2019 - 13:10:17 EST


Any thoughts on this? I know of at least 2 Lenovo models that are
running into this problem.

In the case of the one I have currently have access to the problem is
that the hash algorithm id for an event isn't one that is currently in
the TCG registry, and it fails to find a match when walking the
digest_sizes array. That seems like an issue for the vendor to fix in the bios,
but we should look at the return value of tpm2_calc_event_log_size and not
stick a negative value in efi_tpm_final_log_size.