Patch "ktest.pl: Avoid false positives with grub2 skip regex" has been added to the 6.11-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

    ktest.pl: Avoid false positives with grub2 skip regex

to the 6.11-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:
     ktest.pl-avoid-false-positives-with-grub2-skip-regex.patch
and it can be found in the queue-6.11 subdirectory.

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



commit dc430e2732b9e8edadc5bbe0dc9f5fdc616f4900
Author: Daniel Jordan <daniel.m.jordan@xxxxxxxxxx>
Date:   Wed Sep 4 13:55:30 2024 -0400

    ktest.pl: Avoid false positives with grub2 skip regex
    
    [ Upstream commit 2351e8c65404aabc433300b6bf90c7a37e8bbc4d ]
    
    Some distros have grub2 config files with the lines
    
        if [ x"${feature_menuentry_id}" = xy ]; then
          menuentry_id_option="--id"
        else
          menuentry_id_option=""
        fi
    
    which match the skip regex defined for grub2 in get_grub_index():
    
        $skip = '^\s*menuentry';
    
    These false positives cause the grub number to be higher than it
    should be, and the wrong kernel can end up booting.
    
    Grub documents the menuentry command with whitespace between it and the
    title, so make the skip regex reflect this.
    
    Link: https://lore.kernel.org/20240904175530.84175-1-daniel.m.jordan@xxxxxxxxxx
    Signed-off-by: Daniel Jordan <daniel.m.jordan@xxxxxxxxxx>
    Acked-by: John 'Warthog9' Hawley (Tenstorrent) <warthog9@xxxxxxxxxxxxxx>
    Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index eb31cd9c977bf..e24cd825e70a6 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -2047,7 +2047,7 @@ sub get_grub_index {
     } elsif ($reboot_type eq "grub2") {
 	$command = "cat $grub_file";
 	$target = '^\s*menuentry.*' . $grub_menu_qt;
-	$skip = '^\s*menuentry';
+	$skip = '^\s*menuentry\s';
 	$submenu = '^\s*submenu\s';
     } elsif ($reboot_type eq "grub2bls") {
 	$command = $grub_bls_get;




[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