grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRUB unexpected trap in Itanium


From: Vladimir 'phcoder' Serbinenko
Subject: Re: GRUB unexpected trap in Itanium
Date: Fri, 11 Aug 2023 03:01:18 +0200



Le ven. 11 août 2023, 02:17, Pedro Miguel Justo <pmsjt@texair.net> a écrit :
Hello!

It seems as a recent change has caused a regression on Itanium (ia64), rendering the platform unbootable. GRUB will crash very early with:


```
Welcome to GRUB!

7 0 0x00006B 0x000000000000001E unexpected trap
7 0 0x000066 0x000000000000001E trap taken, number in ext PE
7 0 0x00003C 0x0000000000005A00 trap taken, offset in ext PE
```

I have bisected the issue and it resulted into the following change:

```
06edd40db76bb78457ac26156ed5f7b62381bbe8 is the first bad commit
commit 06edd40db76bb78457ac26156ed5f7b62381bbe8
Author: Oliver Steffen <osteffen@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 <osteffen@redhat.com>
    Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
```

The issue is most likely related with an unaligned memory access exception resulting from may global GUID variables being changed from `grub_efi_guid_t` (which are decorated with `__attribute__ ((aligned(8)))`) to the new and unified `grub_guid_t` type (now decorated with `__attribute__ ((packed))`).

Do you concur?
That makes perfect sense. Thank you for the analysis. When passing GUID to EFI we need it to be aligned. I propose to partially revert the commit and keep efi_guid either completely separate or to include common guid type as the only structure in it.

Pedro


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]