Patch "scripts/mksysmap: Fix badly escaped '$'" has been added to the 6.4-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

    scripts/mksysmap: Fix badly escaped '$'

to the 6.4-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:
     scripts-mksysmap-fix-badly-escaped.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 3005fea783ea6f6375397382903e15109cb9f079
Author: Pierre-Clément Tosi <ptosi@xxxxxxxxxx>
Date:   Tue Jun 6 17:35:53 2023 +0000

    scripts/mksysmap: Fix badly escaped '$'
    
    [ Upstream commit ec336aa83162fe0f3d554baed2d4e2589b69ec6e ]
    
    The backslash characters escaping '$' in the command to sed (intended to
    prevent it from interpreting '$' as "end-of-line") are currently being
    consumed by the Shell (where they mean that sh should not evaluate what
    follows '$' as a variable name). This means that
    
        sed -e "/ \$/d"
    
    executes the script
    
        / $/d
    
    instead of the intended
    
        / \$/d
    
    So escape twice in mksysmap any '$' that actually needs to reach sed
    escaped so that the backslash survives the Shell.
    
    Fixes: c4802044a0a7 ("scripts/mksysmap: use sed with in-line comments")
    Fixes: 320e7c9d4494 ("scripts/kallsyms: move compiler-generated symbol patterns to mksysmap")
    Signed-off-by: Pierre-Clément Tosi <ptosi@xxxxxxxxxx>
    Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/scripts/mksysmap b/scripts/mksysmap
index cb3b1fff3eee8..ec33385261022 100755
--- a/scripts/mksysmap
+++ b/scripts/mksysmap
@@ -32,7 +32,7 @@ ${NM} -n ${1} | sed >${2} -e "
 #  (do not forget a space before each pattern)
 
 # local symbols for ARM, MIPS, etc.
-/ \$/d
+/ \\$/d
 
 # local labels, .LBB, .Ltmpxxx, .L__unnamed_xx, .LASANPC, etc.
 / \.L/d
@@ -41,7 +41,7 @@ ${NM} -n ${1} | sed >${2} -e "
 / __efistub_/d
 
 # arm64 local symbols in non-VHE KVM namespace
-/ __kvm_nvhe_\$/d
+/ __kvm_nvhe_\\$/d
 / __kvm_nvhe_\.L/d
 
 # arm64 lld



[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