Patch "scripts/decode_stacktrace.sh: silence stderr messages from addr2line/nm" has been added to the 5.10-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/decode_stacktrace.sh: silence stderr messages from addr2line/nm

to the 5.10-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-decode_stacktrace.sh-silence-stderr-messages.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 5e2e842cb647d96b4877f7807335a47a5963d8ab
Author: Stephen Boyd <swboyd@xxxxxxxxxxxx>
Date:   Wed Jul 7 18:09:35 2021 -0700

    scripts/decode_stacktrace.sh: silence stderr messages from addr2line/nm
    
    [ Upstream commit 5bf0f3bc377e5f87bfd61ccc9c1efb3c6261f2c3 ]
    
    Sometimes if you're using tools that have linked things improperly or have
    new features/sections that older tools don't expect you'll see warnings
    printed to stderr.  We don't really care about these warnings, so let's
    just silence these messages to cleanup output of this script.
    
    Link: https://lkml.kernel.org/r/20210511003845.2429846-10-swboyd@xxxxxxxxxxxx
    Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
    Cc: Jessica Yu <jeyu@xxxxxxxxxx>
    Cc: Evan Green <evgreen@xxxxxxxxxxxx>
    Cc: Hsin-Yi Wang <hsinyi@xxxxxxxxxxxx>
    Cc: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>
    Cc: Sasha Levin <sashal@xxxxxxxxxx>
    Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
    Cc: Baoquan He <bhe@xxxxxxxxxx>
    Cc: Borislav Petkov <bp@xxxxxxxxx>
    Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
    Cc: Dave Young <dyoung@xxxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxxxxx>
    Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
    Cc: Petr Mladek <pmladek@xxxxxxxx>
    Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
    Cc: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
    Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
    Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Cc: Vivek Goyal <vgoyal@xxxxxxxxxx>
    Cc: Will Deacon <will@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: efbd63983533 ("scripts/decode_stacktrace.sh: optionally use LLVM utilities")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 90398347e366..5bdf610f33d2 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -51,7 +51,7 @@ find_module() {
 	find_module && return
 
 	if [[ $release == "" ]] ; then
-		release=$(gdb -ex 'print init_uts_ns.name.release' -ex 'quit' -quiet -batch "$vmlinux" | sed -n 's/\$1 = "\(.*\)".*/\1/p')
+		release=$(gdb -ex 'print init_uts_ns.name.release' -ex 'quit' -quiet -batch "$vmlinux" 2>/dev/null | sed -n 's/\$1 = "\(.*\)".*/\1/p')
 	fi
 
 	for dn in {/usr/lib/debug,}/lib/modules/$release ; do
@@ -105,7 +105,7 @@ parse_symbol() {
 	if [[ "${cache[$module,$name]+isset}" == "isset" ]]; then
 		local base_addr=${cache[$module,$name]}
 	else
-		local base_addr=$(nm "$objfile" | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}')
+		local base_addr=$(nm "$objfile" 2>/dev/null | awk '$3 == "'$name'" && ($2 == "t" || $2 == "T") {print $1; exit}')
 		if [[ $base_addr == "" ]] ; then
 			# address not found
 			return
@@ -129,7 +129,7 @@ parse_symbol() {
 	if [[ "${cache[$module,$address]+isset}" == "isset" ]]; then
 		local code=${cache[$module,$address]}
 	else
-		local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address")
+		local code=$(${CROSS_COMPILE}addr2line -i -e "$objfile" "$address" 2>/dev/null)
 		cache[$module,$address]=$code
 	fi
 




[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