Re: [RFC PATCH] tpm: only set efi_tpm_final_log_size after successful event log parsing
From: Jarkko Sakkinen
Date: Wed Sep 25 2019 - 06:39:11 EST
On Wed, Sep 18, 2019 at 12:16:26PM -0700, Jerry Snitselaar wrote:
> + if (tbl_size < 0) {
> + pr_err("Failed to parse event in TPM Final Event log\n");
FW_BUG?
> + goto calc_out;
> + }
> +
> memblock_reserve((unsigned long)final_tbl,
> tbl_size + sizeof(*final_tbl));
> - early_memunmap(final_tbl, sizeof(*final_tbl));
> efi_tpm_final_log_size = tbl_size;
>
> +calc_out:
> + early_memunmap(final_tbl, sizeof(*final_tbl));
out_calc
> out:
> early_memunmap(log_tbl, sizeof(*log_tbl));
> return ret;
> --
> 2.23.0
>
/Jarkko