linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] tracing/arm: Fix the stack tracer when LR is saved after local storage
@ 2019-08-07 16:34 Steven Rostedt
  2019-08-07 16:34 ` [PATCH 1/2] tracing/arm64: Have max stack tracer handle the case of return address after data Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Steven Rostedt @ 2019-08-07 16:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jiping Ma, catalin.marinas, will.deacon, mingo, Joel Fernandes,
	linux-arm-kernel


As arm64 saves the link register after a function's local variables are
stored, it causes the max stack tracer to be off by one in its output
of which function has the bloated stack frame.

The first patch fixes this by creating a ARCH_RET_ADDR_BEFORE_LOCAL_VARS
define that an achitecture (arm64) may set in asm/ftrace.h, and this
will cause the stack tracer to make the shift.

As it has been proven that the stack tracer isn't the most trivial
algorithm to understand by staring at the code, the second patch adds
comments to the code to explain the algorithm with and without the
ARCH_RET_ADDR_BEFORE_LOCAL_VARS.

Hmm, should this be sent to stable (and for inclusion now?)

-- Steve

Steven Rostedt (VMware) (2):
      tracing/arm64: Have max stack tracer handle the case of return address after data
      tracing: Document the stack trace algorithm in the comments

----
 arch/arm64/include/asm/ftrace.h |   1 +
 kernel/trace/trace_stack.c      | 112 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 113 insertions(+)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-07 17:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 16:34 [PATCH 0/2] tracing/arm: Fix the stack tracer when LR is saved after local storage Steven Rostedt
2019-08-07 16:34 ` [PATCH 1/2] tracing/arm64: Have max stack tracer handle the case of return address after data Steven Rostedt
2019-08-07 16:34 ` [PATCH 2/2] tracing: Document the stack trace algorithm in the comments Steven Rostedt
2019-08-07 16:40   ` Steven Rostedt
2019-08-07 17:08 ` [PATCH 0/2] tracing/arm: Fix the stack tracer when LR is saved after local storage Mark Rutland
2019-08-07 17:20   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).