diff options
| author | Michal Suchanek <msuchanek@suse.de> | 2021-07-08 11:46:54 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-28 13:30:56 +0200 |
| commit | bd2b3b13aa2a965db1e03e93f41b7cca875185a6 (patch) | |
| tree | de3f11317f937be08820ffbb3da34a19ad583e1e /drivers/firmware | |
| parent | 9413c0abb57f70a953b1116318d6aa478013c35d (diff) | |
| download | linux-bd2b3b13aa2a965db1e03e93f41b7cca875185a6.tar.gz linux-bd2b3b13aa2a965db1e03e93f41b7cca875185a6.tar.bz2 linux-bd2b3b13aa2a965db1e03e93f41b7cca875185a6.zip | |
efi/tpm: Differentiate missing and invalid final event log table.
[ Upstream commit 674a9f1f6815849bfb5bf385e7da8fc198aaaba9 ]
Missing TPM final event log table is not a firmware bug.
Clearly if providing event log in the old format makes the final event
log invalid it should not be provided at least in that case.
Fixes: b4f1874c6216 ("tpm: check event log version before reading final events")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/firmware')
| -rw-r--r-- | drivers/firmware/efi/tpm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c index c1955d320fec..8f665678e9e3 100644 --- a/drivers/firmware/efi/tpm.c +++ b/drivers/firmware/efi/tpm.c @@ -62,9 +62,11 @@ int __init efi_tpm_eventlog_init(void) tbl_size = sizeof(*log_tbl) + log_tbl->size; memblock_reserve(efi.tpm_log, tbl_size); - if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR || - log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) { - pr_warn(FW_BUG "TPM Final Events table missing or invalid\n"); + if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR) { + pr_info("TPM Final Events table not present\n"); + goto out; + } else if (log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) { + pr_warn(FW_BUG "TPM Final Events table invalid\n"); goto out; } |
