Skip to content

efi/libstub: Clean up command line handling

Ard Biesheuvel linux-efi stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4efi/libstub: Free correct pointer on failuredrivers/firmware/efi/libstub/efi-stub.c+1 -10 replies
2/4efi/libstub: Parse builtin command line after bootloader provided onedrivers/firmware/efi/libstub/efi-stub.c+8 -110 replies
3/4efi/libstub: Fix command line fallback handling when loading filesdrivers/firmware/efi/libstub/file.c+20 -00 replies
4/4efi/libstub: Take command line overrides into account for loaded filesdrivers/firmware/efi/libstub/file.c+2 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] efi/libstub: Clean up command line handling

From: Ard Biesheuvel <[email protected]>

This is a follow-up to the patches sent out by Jonathan last week [0][1], to fix the broken command line handling in the EFI stub, which currently fails to use the built-on command line as a fallback as it never considers the bootloader provided command line to be empty.

This series fixes some more identified issues:
- free the correct pointer on error
- parse the built-in command line *after* the bootloader provided one, if both are available, to match the core kernel's behavior
- implement the missing fallback handling when loading files provided on the command line via initrd= or dtb=
- ignore the bootloader provided command line when FORCE or OVERRIDE are configured

The latter is provided as a separate change, as it changes behavior in a way that could result in regressions, however unlikely.

[0] https://lore.kernel.org/all/[email protected]/#r
[1] https://lore.kernel.org/all/CAMj1kXGbuZnM8GoHasWNxs2YOnUDL-JViRmvGdVc91WHkMbdqA@mail.gmail.com/T/#u

Cc Jonathan Marek <[email protected]>

Ard Biesheuvel (4):
efi/libstub: Free correct pointer on failure
efi/libstub: Parse builtin command line after bootloader provided one efi/libstub: Fix command line fallback handling when loading files efi/libstub: Take command line overrides into account for loaded files

 drivers/firmware/efi/libstub/efi-stub.c | 21 +++++++++-----------
 drivers/firmware/efi/libstub/file.c     | 21 ++++++++++++++++++++
 2 files changed, 30 insertions(+), 12 deletions(-)
Signature · 1 line
2.47.0.rc1.288.g06298d1525-goog