mbox series

[v3,0/4] efi/arm64: work around Image placement issues

Message ID 20210726145156.12006-1-ardb@kernel.org
Headers show
Series efi/arm64: work around Image placement issues | expand

Message

Ard Biesheuvel July 26, 2021, 2:51 p.m. UTC
Ben reported that distro GRUB may fail to boot in some circumstances,
and tracked it down to an issue in the way distro GRUB allocates space
for the image. Due to an oversight (addressed in patch #2), this
condition is rarely triggered, but let's work around it in any case (#1)

Remaining patches add further warnings for conditions that are unlikely
to occur, but should not be ignored.

Build tested only.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Ard Biesheuvel (4):
  efi/libstub: arm64: Force Image reallocation if BSS was not reserved
  efi/libstub: arm64: Relax 2M alignment again for relocatable kernels
  efi/libstub: arm64: Warn when efi_random_alloc() fails
  efi/libstub: arm64: Double check image alignment at entry

 drivers/firmware/efi/libstub/arm64-stub.c | 71 +++++++++++++++++---
 1 file changed, 61 insertions(+), 10 deletions(-)

Comments

Benjamin Herrenschmidt Aug. 2, 2021, 11:26 a.m. UTC | #1
On Mon, 2021-07-26 at 16:51 +0200, Ard Biesheuvel wrote:
> Ben reported that distro GRUB may fail to boot in some circumstances,

> and tracked it down to an issue in the way distro GRUB allocates space

> for the image. Due to an oversight (addressed in patch #2), this

> condition is rarely triggered, but let's work around it in any case (#1)

> 

> Remaining patches add further warnings for conditions that are unlikely

> to occur, but should not be ignored.

> 

> Build tested only.

> 

> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>


All 4 patches:

Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>


I checked that it catches all of the errors, including reverting my fix
for randomalloc.c and verifying that it caught (and successfully worked
around) the original boot  crash.

Cheers,
Ben.
Ard Biesheuvel Aug. 2, 2021, 12:03 p.m. UTC | #2
On Mon, 2 Aug 2021 at 13:26, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
>

> On Mon, 2021-07-26 at 16:51 +0200, Ard Biesheuvel wrote:

> > Ben reported that distro GRUB may fail to boot in some circumstances,

> > and tracked it down to an issue in the way distro GRUB allocates space

> > for the image. Due to an oversight (addressed in patch #2), this

> > condition is rarely triggered, but let's work around it in any case (#1)

> >

> > Remaining patches add further warnings for conditions that are unlikely

> > to occur, but should not be ignored.

> >

> > Build tested only.

> >

> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>

>

> All 4 patches:

>

> Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

>

> I checked that it catches all of the errors, including reverting my fix

> for randomalloc.c and verifying that it caught (and successfully worked

> around) the original boot  crash.

>


Excellent. Thanks for tracking this down and getting it fixed properly.