The patch titled Subject: scripts/decode_stacktrace.sh: better support to ARM32 module stack trace has been added to the -mm mm-nonmm-unstable branch. Its filename is scripts-decode_stacktracesh-better-support-to-arm32-module-stack-trace.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/scripts-decode_stacktracesh-better-support-to-arm32-module-stack-trace.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Xiong Nandi <xndchn@xxxxxxxxx> 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. Link: https://lkml.kernel.org/r/20240524042600.14738-3-xndchn@xxxxxxxxx Signed-off-by: Xiong Nandi <xndchn@xxxxxxxxx> Suggested-by: Elliot Berman <quic_eberman@xxxxxxxxxxx> Cc: Bjorn Andersson <quic_bjorande@xxxxxxxxxxx> Cc: Carlos Llamas <cmllamas@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/decode_stacktrace.sh | 3 +++ 1 file changed, 3 insertions(+) --- a/scripts/decode_stacktrace.sh~scripts-decode_stacktracesh-better-support-to-arm32-module-stack-trace +++ a/scripts/decode_stacktrace.sh @@ -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 xndchn@xxxxxxxxx are scripts-decode_stacktracesh-wrap-nm-with-util_prefix-and-util_suffix.patch scripts-decode_stacktracesh-better-support-to-arm32-module-stack-trace.patch