Skip to content

efi: Allow initrd LoadFile2 proto on loaded image

Ard Biesheuvel linux-efi 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- pass 'end of device path' to LoadFile2() when grabbing the protocol from the loaded image instead of from the initrd global device path
- add Ilias's tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3efi/libstub: Use const qualified device path protocol pointersdrivers/firmware/efi/libstub/efi-stub-helper.c drivers/firmware/efi/libstub/efistub.h drivers/firmware/efi/libstub/file.c+5 -50 replies
2/3efi/libstub: Pass loaded image EFI handle to efi_load_initrd()drivers/firmware/efi/libstub/efi-stub-helper.c drivers/firmware/efi/libstub/efi-stub.c drivers/firmware/efi/libstub/efistub.h +1 more+8 -60 replies
3/3efi/libstub: Look for initrd LoadFile2 protocol on image handledrivers/firmware/efi/libstub/efi-stub-helper.c include/linux/efi.h include/linux/pe.h+35 -210 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchIlias Apalodimas
1/3
2/3T-b R-b
3/3T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] efi: Allow initrd LoadFile2 proto on loaded image

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.

Changes since v1:
- pass 'end of device path' to LoadFile2() when grabbing the protocol from the loaded image instead of from the initrd global device path
- add Ilias's tags

Cc Michael Brown <[email protected]>
Cc Ilias Apalodimas <[email protected]>

Ard Biesheuvel (3):
efi/libstub: Use const qualified device path protocol pointers 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 | 56 ++++++++++++--------
 drivers/firmware/efi/libstub/efi-stub.c        |  4 +-
 drivers/firmware/efi/libstub/efistub.h         |  7 +--
 drivers/firmware/efi/libstub/file.c            |  2 +-
 drivers/firmware/efi/libstub/x86-stub.c        |  4 +-
 include/linux/efi.h                            |  1 +
 include/linux/pe.h                             |  2 +-
 7 files changed, 46 insertions(+), 30 deletions(-)
Signature · 1 line
2.39.2