[PATCH v5 3/3] efi_loader: Extend PCR's for firmware measurements

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Nov 25 16:16:54 CET 2021


Hi Ruchika,

I just noticed the TPM_DIGEST_LEN usage


[...]
> > +        * If PCR0 is 0, previous firmware didn't have the capability
> > +        * to extend the PCR. In this scenario, extend the PCR as
> > +        * the eventlog is parsed.
> > +        */
> > +       for (i = 0; i < digest_list.count; i++) {
> > +               u8 buffer[TPM2_DIGEST_LEN] =  { 0 };

This is only 32 bytes, you need TPM2_SHA512_DIGEST_SIZE to fit all digests

> > +               u16 hash_alg = digest_list.digests[i].hash_alg;
[...]

Regards
/Ilias


More information about the U-Boot mailing list