lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20240524042600.14738-3-xndchn@gmail.com>
Date: Fri, 24 May 2024 12:26:00 +0800
From: Xiong Nandi <xndchn@...il.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
	quic_bjorande@...cinc.com,
	cmllamas@...gle.com,
	quic_eberman@...cinc.com,
	Xiong Nandi <xndchn@...il.com>
Subject: [PATCH v3 2/2] scripts/decode_stacktrace.sh: better support to ARM32 module stack trace

Sometimes there is special characters around module name in stack trace,
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 firstly:
(dump_stack_lvl) from hello_init (/foo/test.c:10) test

Signed-off-by: Xiong Nandi <xndchn@...il.com>
Suggested-by: Elliot Berman <quic_eberman@...cinc.com>
---
 scripts/decode_stacktrace.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 2bc3a54ff..a0f50a5b4 100755
--- a/scripts/decode_stacktrace.sh
+++ b/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#* }
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ