]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efi/libstub: Parse builtin command line after bootloader provided one
authorArd Biesheuvel <ardb@kernel.org>
Sun, 13 Oct 2024 13:50:03 +0000 (15:50 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 15 Nov 2024 16:40:10 +0000 (17:40 +0100)
commite6384c398459c40e9304fbb478079884a5967bd4
tree858118760190d72066d9c41a9e907e0fee810350
parent21b1a7f7ae2f53c914f584a72a85cb4f71227e28
efi/libstub: Parse builtin command line after bootloader provided one

When CONFIG_CMDLINE_EXTEND is set, the core kernel command line handling
logic appends CONFIG_CMDLINE to the bootloader provided command line.
The EFI stub does the opposite, and parses the builtin one first.

The usual behavior of command line options is that the last one takes
precedence if it appears multiple times, unless there is a meaningful
way to combine them. In either case, parsing the builtin command line
first while the core kernel does it in the opposite order is likely to
produce inconsistent results in such cases.

Therefore, switch the order in the stub to match the core kernel.

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