Skip to content

ftrace: make sure preemption disabled on recursion testing

王贇 linux-csky linux-parisc linux-riscv linuxppc-dev live-patching lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ftrace: disable preemption on the testing of recursionarch/csky/kernel/probes/ftrace.c arch/parisc/kernel/ftrace.c arch/powerpc/kernel/kprobes-ftrace.c +5 more+9 -2212 replies
2/2ftrace: prevent preemption in perf_ftrace_function_call()kernel/trace/trace_event_perf.c+13 -42 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPalmer Dabbelt
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] ftrace: make sure preemption disabled on recursion testing

The testing show that perf_ftrace_function_call() are using smp_processor_id() with preemption enabled, all the checking on CPU could be wrong after preemption, PATCH 1/2 will fix that.

Besides, as Peter point out, the testing of recursion within the section between ftrace_test_recursion_trylock()/_unlock() pair also need the preemption disabled as the documentation explained, PATCH 2/2 will make sure on that.

Michael Wang (2):
ftrace: disable preemption on the testing of recursion
ftrace: prevent preemption in perf_ftrace_function_call()

 arch/csky/kernel/probes/ftrace.c     |  2 --
 arch/parisc/kernel/ftrace.c          |  2 --
 arch/powerpc/kernel/kprobes-ftrace.c |  2 --
 arch/riscv/kernel/probes/ftrace.c    |  2 --
 arch/x86/kernel/kprobes/ftrace.c     |  2 --
 include/linux/trace_recursion.h      | 10 +++++++++-
 kernel/livepatch/patch.c             |  6 ------
 kernel/trace/trace_event_perf.c      | 17 +++++++++++++----
 kernel/trace/trace_functions.c       |  5 -----
 9 files changed, 22 insertions(+), 26 deletions(-)
Signature · 1 line
1.8.3.1