public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Josh Poimboeuf <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, hpa@zytor.com, luto@amacapital.net,
	dvlasenk@redhat.com, torvalds@linux-foundation.org,
	nilayvaish@gmail.com, bp@alien8.de, keescook@chromium.org,
	linux-kernel@vger.kernel.org, rostedt@goodmis.org,
	byungchul.park@lge.com, jpoimboe@redhat.com, fweisbec@gmail.com,
	tglx@linutronix.de, brgerst@gmail.com, mingo@kernel.org,
	luto@kernel.org
Subject: [tip:x86/asm] x86/dumpstack/ftrace: Don't print unreliable addresses in print_context_stack_bp()
Date: Wed, 24 Aug 2016 06:06:28 -0700	[thread overview]
Message-ID: <tip-13e25bab7e51bdd4ba7df1ef2388961294bb565e@git.kernel.org> (raw)
In-Reply-To: <c51aef578d8027791b38d2ad9bac0c7f499fde91.1471607358.git.jpoimboe@redhat.com>

Commit-ID:  13e25bab7e51bdd4ba7df1ef2388961294bb565e
Gitweb:     http://git.kernel.org/tip/13e25bab7e51bdd4ba7df1ef2388961294bb565e
Author:     Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Fri, 19 Aug 2016 06:53:02 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 24 Aug 2016 12:15:15 +0200

x86/dumpstack/ftrace: Don't print unreliable addresses in print_context_stack_bp()

When function graph tracing is enabled, print_context_stack_bp() can
report return_to_handler() as an unreliable address, which is confusing
and misleading: return_to_handler() is really only useful as a hint for
debugging, whereas print_context_stack_bp() users only care about the
actual 'reliable' call path.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nilay Vaish <nilayvaish@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/c51aef578d8027791b38d2ad9bac0c7f499fde91.1471607358.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/dumpstack.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index 6aad8d4..01072e9 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -126,8 +126,6 @@ print_context_stack_bp(struct task_struct *task,
 			break;
 
 		real_addr = ftrace_graph_ret_addr(task, graph, addr, retp);
-		if (real_addr != addr && ops->address(data, addr, 0))
-			break;
 		if (ops->address(data, real_addr, 1))
 			break;
 

  reply	other threads:[~2016-08-24 13:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19 11:52 [PATCH 0/8] ftrace/x86: function_graph stack dump fixes Josh Poimboeuf
2016-08-19 11:52 ` [PATCH 1/8] ftrace: remove CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST from config Josh Poimboeuf
2016-08-24 13:03   ` [tip:x86/asm] ftrace: Remove " tip-bot for Josh Poimboeuf
2016-08-19 11:52 ` [PATCH 2/8] ftrace: only allocate the ret_stack 'fp' field when needed Josh Poimboeuf
2016-08-24 13:03   ` [tip:x86/asm] ftrace: Only " tip-bot for Josh Poimboeuf
2016-08-19 11:52 ` [PATCH 3/8] ftrace: add return address pointer to ftrace_ret_stack Josh Poimboeuf
2016-08-24 13:04   ` [tip:x86/asm] ftrace: Add " tip-bot for Josh Poimboeuf
2016-08-19 11:52 ` [PATCH 4/8] ftrace: add ftrace_graph_ret_addr() stack unwinding helpers Josh Poimboeuf
2016-08-24 13:04   ` [tip:x86/asm] ftrace: Add " tip-bot for Josh Poimboeuf
2016-08-19 11:52 ` [PATCH 5/8] x86/dumpstack/ftrace: convert dump_trace() callbacks to use ftrace_graph_ret_addr() Josh Poimboeuf
2016-08-24 13:05   ` [tip:x86/asm] x86/dumpstack/ftrace: Convert " tip-bot for Josh Poimboeuf
2016-08-19 11:53 ` [PATCH 6/8] ftrace/x86: implement HAVE_FUNCTION_GRAPH_RET_ADDR_PTR Josh Poimboeuf
2016-08-24 13:05   ` [tip:x86/asm] ftrace/x86: Implement HAVE_FUNCTION_GRAPH_RET_ADDR_PTR tip-bot for Josh Poimboeuf
2016-08-19 11:53 ` [PATCH 7/8] x86/dumpstack/ftrace: mark function graph handler function as unreliable Josh Poimboeuf
2016-08-24 13:06   ` [tip:x86/asm] x86/dumpstack/ftrace: Mark " tip-bot for Josh Poimboeuf
2016-08-19 11:53 ` [PATCH 8/8] x86/dumpstack/ftrace: don't print unreliable addresses in print_context_stack_bp() Josh Poimboeuf
2016-08-24 13:06   ` tip-bot for Josh Poimboeuf [this message]
2016-08-23 14:27 ` [PATCH 0/8] ftrace/x86: function_graph stack dump fixes Steven Rostedt
2016-08-24 10:13   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-13e25bab7e51bdd4ba7df1ef2388961294bb565e@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=byungchul.park@lge.com \
    --cc=dvlasenk@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=nilayvaish@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox