mbox series

[v2,0/2] tcgbios: Fix 2 issues related to handling of GPT table

Message ID 20250405021507.2707113-1-stefanb@linux.ibm.com
Headers show
Series tcgbios: Fix 2 issues related to handling of GPT table | expand

Message

Stefan Berger April 5, 2025, 2:15 a.m. UTC
This series fixes the following 2 issues related to the handling of the
GPT table:

- The endianess of NumberOfPartitions was wrong in the measurement log
- Remove the reserved data array from UEFI_PARTITION_TABLE_HEADER and
  log and measure exactly the size of the UEFI partition table header
  (92 bytes)

Regards,
   Stefan

v2:
 - Took Alexey's suggestions

Stefan Berger (2):
  tcgbios: Fix endianess of NumberOfPartitions
  tcgbios: Only measure size indicated in UEFI partition table header

 lib/libtpm/tcgbios.c     | 27 ++++++++++++++++++++-------
 lib/libtpm/tcgbios_int.h |  1 -
 2 files changed, 20 insertions(+), 8 deletions(-)

Comments

Gary Lin April 8, 2025, 6:52 a.m. UTC | #1
On Fri, Apr 04, 2025 at 10:15:05PM -0400, Stefan Berger wrote:
> This series fixes the following 2 issues related to the handling of the
> GPT table:
> 
> - The endianess of NumberOfPartitions was wrong in the measurement log
> - Remove the reserved data array from UEFI_PARTITION_TABLE_HEADER and
>   log and measure exactly the size of the UEFI partition table header
>   (92 bytes)
> 
The GPT event matches what pcr-oracle expects after applying those two
patches.

Tested-by: Gary Lin <glin@suse.com>

> Regards,
>    Stefan
> 
> v2:
>  - Took Alexey's suggestions
> 
> Stefan Berger (2):
>   tcgbios: Fix endianess of NumberOfPartitions
>   tcgbios: Only measure size indicated in UEFI partition table header
> 
>  lib/libtpm/tcgbios.c     | 27 ++++++++++++++++++++-------
>  lib/libtpm/tcgbios_int.h |  1 -
>  2 files changed, 20 insertions(+), 8 deletions(-)
> 
> -- 
> 2.25.1
>
Stefan Berger April 8, 2025, 4:47 p.m. UTC | #2
On 4/8/25 2:52 AM, Gary Lin wrote:
> On Fri, Apr 04, 2025 at 10:15:05PM -0400, Stefan Berger wrote:
>> This series fixes the following 2 issues related to the handling of the
>> GPT table:
>>
>> - The endianess of NumberOfPartitions was wrong in the measurement log
>> - Remove the reserved data array from UEFI_PARTITION_TABLE_HEADER and
>>    log and measure exactly the size of the UEFI partition table header
>>    (92 bytes)
>>
> The GPT event matches what pcr-oracle expects after applying those two
> patches.
> 
> Tested-by: Gary Lin <glin@suse.com>

Thanks.

> 
>> Regards,
>>     Stefan
>>
>> v2:
>>   - Took Alexey's suggestions
>>
>> Stefan Berger (2):
>>    tcgbios: Fix endianess of NumberOfPartitions
>>    tcgbios: Only measure size indicated in UEFI partition table header
>>
>>   lib/libtpm/tcgbios.c     | 27 ++++++++++++++++++++-------
>>   lib/libtpm/tcgbios_int.h |  1 -
>>   2 files changed, 20 insertions(+), 8 deletions(-)
>>
>> -- 
>> 2.25.1
>>
Alexey Kardashevskiy April 19, 2025, 11:37 a.m. UTC | #3
Thanks, applied.

I noticed the patchworks has not picked "tested-by" while it should have (it definitely would have if individual patches were commented, not the cover letter which is a gray area), sorry about that  :-/

On Wed, 9 Apr 2025, at 02:47, Stefan Berger wrote:
> 
> 
> On 4/8/25 2:52 AM, Gary Lin wrote:
> > On Fri, Apr 04, 2025 at 10:15:05PM -0400, Stefan Berger wrote:
> >> This series fixes the following 2 issues related to the handling of the
> >> GPT table:
> >>
> >> - The endianess of NumberOfPartitions was wrong in the measurement log
> >> - Remove the reserved data array from UEFI_PARTITION_TABLE_HEADER and
> >>    log and measure exactly the size of the UEFI partition table header
> >>    (92 bytes)
> >>
> > The GPT event matches what pcr-oracle expects after applying those two
> > patches.
> > 
> > Tested-by: Gary Lin <glin@suse.com>
> 
> Thanks.
> 
> > 
> >> Regards,
> >>     Stefan
> >>
> >> v2:
> >>   - Took Alexey's suggestions
> >>
> >> Stefan Berger (2):
> >>    tcgbios: Fix endianess of NumberOfPartitions
> >>    tcgbios: Only measure size indicated in UEFI partition table header
> >>
> >>   lib/libtpm/tcgbios.c     | 27 ++++++++++++++++++++-------
> >>   lib/libtpm/tcgbios_int.h |  1 -
> >>   2 files changed, 20 insertions(+), 8 deletions(-)
> >>
> >> -- 
> >> 2.25.1
> >>
> 
>
Gary Lin June 9, 2025, 8:38 a.m. UTC | #4
On Sat, Apr 19, 2025 at 09:37:20PM +1000, Alexey Kardashevskiy wrote:
> Thanks, applied.
> 
> I noticed the patchworks has not picked "tested-by" while it should have (it definitely would have if individual patches were commented, not the cover letter which is a gray area), sorry about that  :-/
> 
Hi Alexey,

It seems that these two patches are not pushed to the github repo yet.

Cheers,

Gary Lin

> On Wed, 9 Apr 2025, at 02:47, Stefan Berger wrote:
> > 
> > 
> > On 4/8/25 2:52 AM, Gary Lin wrote:
> > > On Fri, Apr 04, 2025 at 10:15:05PM -0400, Stefan Berger wrote:
> > >> This series fixes the following 2 issues related to the handling of the
> > >> GPT table:
> > >>
> > >> - The endianess of NumberOfPartitions was wrong in the measurement log
> > >> - Remove the reserved data array from UEFI_PARTITION_TABLE_HEADER and
> > >>    log and measure exactly the size of the UEFI partition table header
> > >>    (92 bytes)
> > >>
> > > The GPT event matches what pcr-oracle expects after applying those two
> > > patches.
> > > 
> > > Tested-by: Gary Lin <glin@suse.com>
> > 
> > Thanks.
> > 
> > > 
> > >> Regards,
> > >>     Stefan
> > >>
> > >> v2:
> > >>   - Took Alexey's suggestions
> > >>
> > >> Stefan Berger (2):
> > >>    tcgbios: Fix endianess of NumberOfPartitions
> > >>    tcgbios: Only measure size indicated in UEFI partition table header
> > >>
> > >>   lib/libtpm/tcgbios.c     | 27 ++++++++++++++++++++-------
> > >>   lib/libtpm/tcgbios_int.h |  1 -
> > >>   2 files changed, 20 insertions(+), 8 deletions(-)
> > >>
> > >> -- 
> > >> 2.25.1
> > >>
> > 
> >
Thomas Huth June 11, 2025, 11:01 a.m. UTC | #5
On 09/06/2025 10.38, Gary Lin wrote:
> On Sat, Apr 19, 2025 at 09:37:20PM +1000, Alexey Kardashevskiy wrote:
>> Thanks, applied.
>>
>> I noticed the patchworks has not picked "tested-by" while it should have (it definitely would have if individual patches were commented, not the cover letter which is a gray area), sorry about that  :-/
>>
> Hi Alexey,
> 
> It seems that these two patches are not pushed to the github repo yet.

  Hi,

we recently switched the repo to gitlab instead:

  https://gitlab.com/slof/slof/

  Thomas
Gary Lin June 12, 2025, 1:36 a.m. UTC | #6
On Wed, Jun 11, 2025 at 01:01:14PM +0200, Thomas Huth wrote:
> On 09/06/2025 10.38, Gary Lin wrote:
> > On Sat, Apr 19, 2025 at 09:37:20PM +1000, Alexey Kardashevskiy wrote:
> > > Thanks, applied.
> > > 
> > > I noticed the patchworks has not picked "tested-by" while it should have (it definitely would have if individual patches were commented, not the cover letter which is a gray area), sorry about that  :-/
> > > 
> > Hi Alexey,
> > 
> > It seems that these two patches are not pushed to the github repo yet.
> 
>  Hi,
> 
> we recently switched the repo to gitlab instead:
> 
>  https://gitlab.com/slof/slof/
> 
Thanks! I'll update my git setting.
Sorry for the noise.

Gary Lin