Skip to content

RFC ftrace: Fix bug with function tracing and lockdep

Steven Rostedt lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest5 patches 0 repliesNew
  2. v15 patches 40 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ftrace: Synchronize variable setting with breakpointsarch/x86/include/asm/ftrace.h arch/x86/kernel/ftrace.c arch/x86/kernel/traps.c+42 -60 replies
2/5ftrace: Use breakpoint method to update ftrace callerarch/x86/kernel/ftrace.c+72 -160 replies
3/5x86: Reset the debug_stack update counterarch/x86/kernel/nmi.c+4 -20 replies
4/5x86: Allow nesting of the debug stack IDT settingarch/x86/kernel/cpu/common.c+7 -10 replies
5/5ftrace/x86: Do not change stacks in DEBUG when calling lockdeparch/x86/kernel/entry_64.S+41 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/5 v2] [RFC] ftrace: Fix bug with function tracing and lockdep

This is an updated version with input from H. Peter Anvin and Peter Zijlstra. It may still not be up to par to actually pull. I would like to hear more comments from people.

Yes, the NMI/INT3/Lockdep is complex. But I believe this is the nature of the beast. If someone can come up with a simpler solution, I'm all ears. Right now, the upstream tree has a bug when enabling function tracer when lockdep is enabled that may crash the system.

Thoughts on this?

-- Steve

These are in the latest tip/perf/urgent-2 tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/perf/urgent-2

Head SHA1: 5963e317b1e9d2a4511503916d8fd664bb8fa8fb

Steven Rostedt (5):
ftrace: Synchronize variable setting with breakpoints
ftrace: Use breakpoint method to update ftrace caller
x86: Reset the debug_stack update counter
x86: Allow nesting of the debug stack IDT setting ftrace/x86: Do not change stacks in DEBUG when calling lockdep

----

 arch/x86/include/asm/ftrace.h |    2 +-
 arch/x86/kernel/cpu/common.c  |    8 +++-
 arch/x86/kernel/entry_64.S    |   44 ++++++++++++++++--
 arch/x86/kernel/ftrace.c      |  102 ++++++++++++++++++++++++++++++++++++++---
 arch/x86/kernel/nmi.c         |    6 ++-
 arch/x86/kernel/traps.c       |    8 +++-
 6 files changed, 154 insertions(+), 16 deletions(-)