Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1531786

[PATCH] decode_stacktrace: fix address line detection on x86

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject [PATCH] decode_stacktrace: fix address line detection on x86
Date 2016-11-29 00:10 +0100
Message-ID <sIDdE-75-45@gated-at.bofh.it> (permalink)
References <swbmO-6YY-23@gated-at.bofh.it> <swbmO-6YY-25@gated-at.bofh.it> <sHnND-wd-1@gated-at.bofh.it> <sIBbP-72M-9@gated-at.bofh.it> <sICAW-85L-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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" <kirill@shutemov.name>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/4] x86/dumpstack: remove kernel text addresses from  stack dump "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-11-25 13:30 +0100
  Re: [PATCH 2/4] x86/dumpstack: remove kernel text addresses from  stack dump Josh Poimboeuf <jpoimboe@redhat.com> - 2016-11-28 22:00 +0100
    Re: [PATCH 2/4] x86/dumpstack: remove kernel text addresses from  stack dump "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-11-28 23:30 +0100
      [PATCH] decode_stacktrace: fix address line detection on x86 Josh Poimboeuf <jpoimboe@redhat.com> - 2016-11-29 00:10 +0100
        [tip:x86/urgent] tools/decode_stacktrace.sh: Fix address line  detection on x86 tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2016-11-29 08:20 +0100
          Re: [tip:x86/urgent] tools/decode_stacktrace.sh: Fix address line  detection on x86 Josh Poimboeuf <jpoimboe@redhat.com> - 2016-11-29 14:10 +0100
            Re: [tip:x86/urgent] tools/decode_stacktrace.sh: Fix address line  detection on x86 Ingo Molnar <mingo@kernel.org> - 2016-11-29 14:30 +0100
        [tip:x86/asm] scripts/decode_stacktrace.sh: Fix address line  detection on x86 tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2016-11-29 15:20 +0100

csiph-web