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

2019-09-25 Thread Jarkko Sakkinen
On Mon, Sep 23, 2019 at 10:10:10AM -0700, Jerry Snitselaar wrote: > 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 c

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

2019-09-25 Thread Jarkko Sakkinen
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, >

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

2019-09-23 Thread Jerry Snitselaar
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

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

2019-09-23 Thread Laura Abbott
On 9/18/19 8:23 PM, Jerry Snitselaar wrote: On Wed Sep 18 19, Jerry Snitselaar wrote: If __calc_tpm2_event_size fails to parse an event it will return 0, resulting tpm2_calc_event_log_size returning -1. Currently there is no check of this return value, and efi_tpm_final_log_size can end up being

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

2019-09-18 Thread Jerry Snitselaar
On Wed Sep 18 19, Jerry Snitselaar wrote: If __calc_tpm2_event_size fails to parse an event it will return 0, resulting tpm2_calc_event_log_size returning -1. Currently there is no check of this return value, and efi_tpm_final_log_size can end up being set to this negative value resulting in a pa

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

2019-09-18 Thread Jerry Snitselaar
If __calc_tpm2_event_size fails to parse an event it will return 0, resulting tpm2_calc_event_log_size returning -1. Currently there is no check of this return value, and efi_tpm_final_log_size can end up being set to this negative value resulting in a panic like the following: [0.774340] BUG: