Commit 674a9f1f authored by Michal Suchanek's avatar Michal Suchanek Committed by Ard Biesheuvel

efi/tpm: Differentiate missing and invalid final event log table.

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: b4f1874c ("tpm: check event log version before reading final events")
Signed-off-by: default avatarMichal Suchanek <msuchanek@suse.de>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent e73f0f0e
...@@ -62,9 +62,11 @@ int __init efi_tpm_eventlog_init(void) ...@@ -62,9 +62,11 @@ int __init efi_tpm_eventlog_init(void)
tbl_size = sizeof(*log_tbl) + log_tbl->size; tbl_size = sizeof(*log_tbl) + log_tbl->size;
memblock_reserve(efi.tpm_log, tbl_size); memblock_reserve(efi.tpm_log, tbl_size);
if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR || if (efi.tpm_final_log == EFI_INVALID_TABLE_ADDR) {
log_tbl->version != EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) { pr_info("TPM Final Events table not present\n");
pr_warn(FW_BUG "TPM Final Events table missing or invalid\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; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment