From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933429AbcK1XHA (ORCPT ); Mon, 28 Nov 2016 18:07:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933256AbcK1XGh (ORCPT ); Mon, 28 Nov 2016 18:06:37 -0500 Date: Mon, 28 Nov 2016 17:06:35 -0600 From: Josh Poimboeuf To: "Kirill A. Shutemov" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds , Sasha Levin , Konstantin Khlebnikov Subject: [PATCH] decode_stacktrace: fix address line detection on x86 Message-ID: <20161128230635.4n2ofgawltgexgcg@treble> References: <69329cb29b8f324bb5fcea14d61d224807fb6488.1477405374.git.jpoimboe@redhat.com> <20161125122604.GB3439@node.shutemov.name> <20161128204958.go7a6evhqm3usq7x@treble> <20161128222711.GA32239@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161128222711.GA32239@node.shutemov.name> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 28 Nov 2016 23:06:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kirill reported that the decode_stacktrace.sh script was broken by the following commit: bb5e5ce545f2 ("x86/dumpstack: Remove kernel text addresses from stack dump") Fix it by updating the per-line absolute address check to also check for function-based address lines like the following: write_sysrq_trigger+0x51/0x60 I didn't remove the check for absolute addresses because it's still needed for ARM. Fixes: bb5e5ce545f2 ("x86/dumpstack: Remove kernel text addresses from stack dump") Reported-by: "Kirill A. Shutemov" Signed-off-by: Josh Poimboeuf --- scripts/decode_stacktrace.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh index c332684..5206d99 100755 --- a/scripts/decode_stacktrace.sh +++ b/scripts/decode_stacktrace.sh @@ -139,7 +139,8 @@ handle_line() { while read line; do # Let's see if we have an address in the line - if [[ $line =~ \[\<([^]]+)\>\] ]]; then + if [[ $line =~ \[\<([^]]+)\>\] ]] || + [[ $line =~ [^+\ ]+\+0x[0-9a-f]+/0x[0-9a-f]+ ]]; then # Translate address to line numbers handle_line "$line" # Is it a code line? -- 2.7.4