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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200730074422.227700703@linuxfoundation.org>
Date:   Thu, 30 Jul 2020 10:05:00 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, Pi-Hsun Shih <pihsun@...omium.org>,
        Shik Chen <shik@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Sasha Levin <sashal@...nel.org>,
        Nicolas Boichat <drinkcat@...omium.org>,
        Jiri Slaby <jslaby@...e.cz>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [PATCH 4.4 21/54] scripts/decode_stacktrace: strip basepath from all paths

From: Pi-Hsun Shih <pihsun@...omium.org>

[ Upstream commit d178770d8d21489abf5bafefcbb6d5243b482e9a ]

Currently the basepath is removed only from the beginning of the string.
When the symbol is inlined and there's multiple line outputs of
addr2line, only the first line would have basepath removed.

Change to remove the basepath prefix from all lines.

Fixes: 31013836a71e ("scripts/decode_stacktrace: match basepath using shell prefix operator, not regex")
Co-developed-by: Shik Chen <shik@...omium.org>
Signed-off-by: Pi-Hsun Shih <pihsun@...omium.org>
Signed-off-by: Shik Chen <shik@...omium.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Reviewed-by: Stephen Boyd <swboyd@...omium.org>
Cc: Sasha Levin <sashal@...nel.org>
Cc: Nicolas Boichat <drinkcat@...omium.org>
Cc: Jiri Slaby <jslaby@...e.cz>
Link: http://lkml.kernel.org/r/20200720082709.252805-1-pihsun@chromium.org
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 scripts/decode_stacktrace.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index 4f5e76f76b9dc..003968cb04d4a 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -63,8 +63,8 @@ parse_symbol() {
 		return
 	fi
 
-	# Strip out the base of the path
-	code=${code#$basepath/}
+	# Strip out the base of the path on each line
+	code=$(while read -r line; do echo "${line#$basepath/}"; done <<< "$code")
 
 	# In the case of inlines, move everything to same line
 	code=${code//$'\n'/' '}
-- 
2.25.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ