Skip to contentSkip to conversation

scripts-decode_stacktracesh-better-support-to-arm32-module-stack-trace.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Jun 25, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: scripts/decode_stacktrace.sh: better support to ARM32 module stack trace
has been removed from the -mm tree. Its filename was
scripts-decode_stacktracesh-better-support-to-arm32-module-stack-trace.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Xiong Nandi <[email protected]>
Subject: scripts/decode_stacktrace.sh: better support to ARM32 module stack trace
Date: Fri, 24 May 2024 12:26:00 +0800

Sometimes there are special characters around module names in stack traces, such as ARM32 with BACKTRACE_VERBOSE in "(%pS)" format, such as:
[<806e4845>] (dump_stack_lvl) from [<7f806013>] (hello_init+0x13/0x1000 [test])

In this case, $module will be "[test])", the trace can be decoded by stripping the right parenthesis first: (dump_stack_lvl) from hello_init (/foo/test.c:10) test.

---

 scripts/decode_stacktrace.sh |    3 +++
 1 file changed, 3 insertions(+)
scripts/decode_stacktrace.sh renamed from scripts/decode_stacktrace.sh~scripts-decode_stacktracesh-better-support-to-arm32-module-stack-trace +3 -0
@@ -283,6 +283,9 @@ handle_line() {
 
 	if [[ ${words[$last]} =~ \[([^]]+)\] ]]; then
 		module=${words[$last]}
+		# some traces format is "(%pS)", which like "(foo+0x0/0x1 [bar])"
+		# so $module may like "[bar])". Strip the right parenthesis firstly
+		module=${module%\)}
 		module=${module#\[}
 		module=${module%\]}
 		modbuildid=${module#* }

_

Patches currently in -mm which might be from [email protected] are