Patch "efi/libstub: fix efi_parse_options() ignoring the default command line" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    efi/libstub: fix efi_parse_options() ignoring the default command line

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     efi-libstub-fix-efi_parse_options-ignoring-the-defau.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 394d7a55630e3ee623197cd87b6c773833a9eb92
Author: Jonathan Marek <jonathan@xxxxxxxx>
Date:   Sun Oct 13 01:11:56 2024 -0400

    efi/libstub: fix efi_parse_options() ignoring the default command line
    
    [ Upstream commit aacfa0ef247b0130b7a98bb52378f8cd727a66ca ]
    
    efi_convert_cmdline() always returns a size of at least 1 because it
    counts the NUL terminator, so the "cmdline_size == 0" condition is never
    satisfied.
    
    Change it to check if the string starts with a NUL character to get the
    intended behavior: to use CONFIG_CMDLINE when load_options_size == 0.
    
    Fixes: 60f38de7a8d4 ("efi/libstub: Unify command line param parsing")
    Signed-off-by: Jonathan Marek <jonathan@xxxxxxxx>
    Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c
index 958a680e0660d..2a1b43f9e0fa2 100644
--- a/drivers/firmware/efi/libstub/efi-stub.c
+++ b/drivers/firmware/efi/libstub/efi-stub.c
@@ -129,7 +129,7 @@ efi_status_t efi_handle_cmdline(efi_loaded_image_t *image, char **cmdline_ptr)
 
 	if (IS_ENABLED(CONFIG_CMDLINE_EXTEND) ||
 	    IS_ENABLED(CONFIG_CMDLINE_FORCE) ||
-	    cmdline_size == 0) {
+	    cmdline[0] == 0) {
 		status = efi_parse_options(CONFIG_CMDLINE);
 		if (status != EFI_SUCCESS) {
 			efi_err("Failed to parse options\n");




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux