]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efi/libstub: Fix command line fallback handling when loading files
authorArd Biesheuvel <ardb@kernel.org>
Sun, 13 Oct 2024 09:20:45 +0000 (11:20 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 17 Nov 2024 07:54:01 +0000 (08:54 +0100)
commit80d01ce607cbffd8fa6ceb8a91ce07667bc51d5a
tree05beb457e3e6cadaff4931c59872f568fb31fdfc
parente6384c398459c40e9304fbb478079884a5967bd4
efi/libstub: Fix command line fallback handling when loading files

CONFIG_CMDLINE, when set, is supposed to serve either as a fallback when
no command line is provided by the bootloader, or to be taken into account
unconditionally, depending on the configured options.

The initrd and dtb loader ignores CONFIG_CMDLINE in either case, and
only takes the EFI firmware provided load options into account. This
means that configuring the kernel with initrd= or dtb= on the built-in
command line does not produce the expected result.

Fix this by doing a separate pass over the built-in command line when
dealing with initrd= or dtb= options.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/file.c