Hi Pedro, all,

On 10.08.23 14:04, Pedro Miguel Justo wrote:
Here it is:

06edd40db76bb78457ac26156ed5f7b62381bbe8 is the first bad commit
commit 06edd40db76bb78457ac26156ed5f7b62381bbe8
Author: Oliver Steffen <ostef...@redhat.com>
Date:   Fri May 26 13:35:43 2023 +0200

     guid: Unify GUID types

     There are 3 implementations of a GUID in GRUB. Replace them with
     a common one, placed in types.h.

     It uses the "packed" flavor of the GUID structs, the alignment attribute
     is dropped, since it is not required.

     Signed-off-by: Oliver Steffen <ostef...@redhat.com>
     Reviewed-by: Daniel Kiper <daniel.ki...@oracle.com>


I had a quick look into this and the ia64 "related" part ([1]) switches
from an `__attribute__ ((aligned(8)))` struct "grub_efi_guid_t" to an
`__attribute__ ((packed))` struct "grub_guid_t" (see [2], [3] and
below), which might not work as expected on ia64.

`include/grub/types.h` defines:

```
#define GRUB_PACKED __attribute__ ((packed))
```

[1]:
https://git.savannah.gnu.org/cgit/grub.git/diff/grub-core/loader/ia64/efi/linux.c?id=06edd40db76bb78457ac26156ed5f7b62381bbe8

[2]:
https://git.savannah.gnu.org/cgit/grub.git/diff/include/grub/efi/api.h?id=06edd40db76bb78457ac26156ed5f7b62381bbe8

[3]:
https://git.savannah.gnu.org/cgit/grub.git/diff/include/grub/types.h?id=06edd40db76bb78457ac26156ed5f7b62381bbe8

Not sure if it could help to just replace `GRUB_PACKED` with
`__attribute__ ((aligned(8)))` for "grub_guid_t" in [3] or if this
breaks the cases that originally used "grub_efi_packed_guid_t".

Cheers,
Frank

Reply via email to