[SLOF] [PATCH] tcgbios: Fix details in log entries

Alexey Kardashevskiy aik at ozlabs.ru
Tue Jun 15 16:27:06 AEST 2021



On 6/10/21 02:48, Stefan Berger wrote:
> Fix two details of the logs:
> 
> - Set the filed SpecErrata to 2 as required by specs.
> - Write the separator into the log entry's event field.
> 
> Signed-off-by: Stefan Berger <stefanb at linux.ibm.com>


Thanks, applied.

> ---
>   lib/libtpm/tcgbios.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/libtpm/tcgbios.c b/lib/libtpm/tcgbios.c
> index 9e1b40c..aebcb10 100644
> --- a/lib/libtpm/tcgbios.c
> +++ b/lib/libtpm/tcgbios.c
> @@ -664,7 +664,7 @@ static int tpm20_write_EfiSpecIdEventStruct(void)
>   		.hdr.platformClass = TPM_TCPA_ACPI_CLASS_CLIENT,
>   		.hdr.specVersionMinor = 0,
>   		.hdr.specVersionMajor = 2,
> -		.hdr.specErrata = 0,
> +		.hdr.specErrata = 2,
>   		.hdr.uintnSize = 2,
>   	};
>   	struct tpms_pcr_selection *sel;
> @@ -963,7 +963,8 @@ uint32_t tpm_add_event_separators(uint32_t start_pcr, uint32_t end_pcr)
>   	/* event separators need to be extended and logged for PCRs 0-7 */
>   	for (pcrIndex = start_pcr; pcrIndex <= end_pcr; pcrIndex++) {
>   		rc = tpm_add_measurement_to_log(pcrIndex, EV_SEPARATOR,
> -						NULL, 0,
> +						(const char *)evt_separator,
> +						sizeof(evt_separator),
>   						evt_separator,
>   						sizeof(evt_separator));
>   		if (rc)
> 

-- 
Alexey


More information about the SLOF mailing list