From: Ard Biesheuvel <ardb@kernel.org>
To: linux-efi@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>, Michael Brown <mcb30@ipxe.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: [PATCH 0/2] efi: Allow initrd LoadFile2 proto on loaded image
Date: Fri, 10 Mar 2023 09:45:27 +0100 [thread overview]
Message-ID: <20230310084529.3229983-1-ardb@kernel.org> (raw)
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
next reply other threads:[~2023-03-10 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 8:45 Ard Biesheuvel [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230310084529.3229983-1-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=linux-efi@vger.kernel.org \
--cc=mcb30@ipxe.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox