Re: [PATCH v8 3/3] efi_loader: add PE/COFF image measurement

2021-05-25 Thread Masahisa Kojima
Hi Heinrich, > > > + /* > > > + * Size must be 8-byte aligned and the trailing bytes must be > > > + * zero'ed. Otherwise hash value may be incorrect. > > > + */ > > > + if (!IS_ALIGNED(*efi_size, 8)) { > > > > Why don't you unconditionally copy to a new buffer? Then the cal

Re: [PATCH v8 3/3] efi_loader: add PE/COFF image measurement

2021-05-25 Thread Masahisa Kojima
On Tue, 25 May 2021 at 21:57, Heinrich Schuchardt wrote: > > On 14.05.21 02:53, Masahisa Kojima wrote: > > "TCG PC Client Platform Firmware Profile Specification" > > requires to measure every attempt to load and execute > > a OS Loader(a UEFI application) into PCR[4]. > > This commit adds the PE/

Re: [PATCH v8 3/3] efi_loader: add PE/COFF image measurement

2021-05-25 Thread Heinrich Schuchardt
On 14.05.21 02:53, Masahisa Kojima wrote: > "TCG PC Client Platform Firmware Profile Specification" > requires to measure every attempt to load and execute > a OS Loader(a UEFI application) into PCR[4]. > This commit adds the PE/COFF image measurement, extends PCR, > and appends measurement into Ev

Re: [PATCH v8 3/3] efi_loader: add PE/COFF image measurement

2021-05-24 Thread Masahisa Kojima
On Mon, 24 May 2021 at 21:53, Ilias Apalodimas wrote: > > new_efi); > > + > > bool efi_image_parse(void *efi, size_t len, struct efi_image_regions > > **regp, > >WIN_CERTIFICATE **auth, size_t *auth_len); > > > > diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h > > index

Re: [PATCH v8 3/3] efi_loader: add PE/COFF image measurement

2021-05-24 Thread Ilias Apalodimas
new_efi); > + > bool efi_image_parse(void *efi, size_t len, struct efi_image_regions **regp, >WIN_CERTIFICATE **auth, size_t *auth_len); > > diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h > index 40e241ce31..bcfb98168a 100644 > --- a/include/efi_tcg2.h > +++ b/include/e

[PATCH v8 3/3] efi_loader: add PE/COFF image measurement

2021-05-13 Thread Masahisa Kojima
"TCG PC Client Platform Firmware Profile Specification" requires to measure every attempt to load and execute a OS Loader(a UEFI application) into PCR[4]. This commit adds the PE/COFF image measurement, extends PCR, and appends measurement into Event Log. Acked-by: Ilias Apalodimas Tested-by: Ili