diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2016-08-19 06:52:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-08-24 12:15:14 +0200 |
commit | 223918e32a87c79ac55ca4aa513ba405ba4d57cd (patch) | |
tree | 8c12990c6b92146a0b11bca0797672399b65c67e /fs/ramfs/Makefile | |
parent | 9a7c348ba6a46f6270d4fe49577649dad5664fe7 (diff) | |
download | linux-stable-223918e32a87c79ac55ca4aa513ba405ba4d57cd.tar.gz linux-stable-223918e32a87c79ac55ca4aa513ba405ba4d57cd.tar.bz2 linux-stable-223918e32a87c79ac55ca4aa513ba405ba4d57cd.zip |
ftrace: Add ftrace_graph_ret_addr() stack unwinding helpers
When function graph tracing is enabled for a function, ftrace modifies
the stack by replacing the original return address with the address of a
hook function (return_to_handler).
Stack unwinders need a way to get the original return address. Add an
arch-independent helper function for that named ftrace_graph_ret_addr().
This adds two variations of the function: one depends on
HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, and the other relies on an index state
variable.
The former is recommended because, in some cases, the latter can cause
problems when the unwinder skips stack frames. It can get out of sync
with the ret_stack index and wrong addresses can be reported for the
stack trace.
Once all arches have been ported to use
HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, we can get rid of the distinction.
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/36bd90f762fc5e5af3929e3797a68a64906421cf.1471607358.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/ramfs/Makefile')
0 files changed, 0 insertions, 0 deletions