public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] efi: Allow initrd LoadFile2 proto on loaded image
@ 2023-03-10  8:45 Ard Biesheuvel
  2023-03-10  8:45 ` [PATCH 1/2] efi: libstub: Pass loaded image EFI handle to efi_load_initrd() Ard Biesheuvel
  2023-03-10  8:45 ` [PATCH 2/2] efi: libstub: Look for initrd LoadFile2 protocol on image handle Ard Biesheuvel
  0 siblings, 2 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-03-10  8:45 UTC (permalink / raw)
  To: linux-efi; +Cc: Ard Biesheuvel, Michael Brown, Ilias Apalodimas

Rework the code that loads the initrd via LoadFile2 so that it looks for
the protocol on the loaded image handle first, and only if it doesn't
find it here, on the global singleton device path. This works around
reported issues where intermediate loader stages are providing an initrd
via this mechanism, and subsequently loading another intermediate boot
stage that does the same.

Link: https://github.com/systemd/systemd/issues/26723

Cc: Michael Brown <mcb30@ipxe.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Ard Biesheuvel (2):
  efi: libstub: Pass loaded image EFI handle to efi_load_initrd()
  efi: libstub: Look for initrd LoadFile2 protocol on image handle

 drivers/firmware/efi/libstub/efi-stub-helper.c | 45 ++++++++++++--------
 drivers/firmware/efi/libstub/efi-stub.c        |  4 +-
 drivers/firmware/efi/libstub/efistub.h         |  3 +-
 drivers/firmware/efi/libstub/x86-stub.c        |  4 +-
 include/linux/efi.h                            |  2 +-
 include/linux/pe.h                             |  2 +-
 6 files changed, 36 insertions(+), 24 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-13  8:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-10  8:45 [PATCH 0/2] efi: Allow initrd LoadFile2 proto on loaded image Ard Biesheuvel
2023-03-10  8:45 ` [PATCH 1/2] efi: libstub: Pass loaded image EFI handle to efi_load_initrd() Ard Biesheuvel
2023-03-13  7:25   ` Ilias Apalodimas
2023-03-10  8:45 ` [PATCH 2/2] efi: libstub: Look for initrd LoadFile2 protocol on image handle Ard Biesheuvel
2023-03-13  8:11   ` Ilias Apalodimas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox