live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ftrace: make sure preemption disabled on recursion testing
@ 2021-10-12  5:39 王贇
  2021-10-12  5:40 ` [PATCH 1/2] ftrace: disable preemption on the testing of recursion 王贇
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: 王贇 @ 2021-10-12  5:39 UTC (permalink / raw)
  To: Guo Ren, Steven Rostedt, Ingo Molnar, James E.J. Bottomley,
	Helge Deller, Michael Ellerman, Benjamin Herrenschmidt,
	Paul Mackerras, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Thomas Gleixner, Borislav Petkov, x86, H. Peter Anvin,
	Josh Poimboeuf, Jiri Kosina, Miroslav Benes, Petr Mladek,
	Joe Lawrence, Colin Ian King, Masami Hiramatsu,
	Peter Zijlstra (Intel),
	Nicholas Piggin, Jisheng Zhang, linux-csky, linux-kernel,
	linux-parisc, linuxppc-dev, linux-riscv, live-patching

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(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2021-10-26 23:48 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12  5:39 [PATCH 0/2] ftrace: make sure preemption disabled on recursion testing 王贇
2021-10-12  5:40 ` [PATCH 1/2] ftrace: disable preemption on the testing of recursion 王贇
2021-10-12 12:17   ` Steven Rostedt
2021-10-13  1:46     ` 王贇
2021-10-12 12:24   ` Miroslav Benes
2021-10-12 12:29     ` Steven Rostedt
2021-10-13  1:52       ` 王贇
2021-10-13  1:50     ` 王贇
2021-10-13  2:27       ` Steven Rostedt
2021-10-13  2:36         ` 王贇
2021-10-12 12:43   ` Steven Rostedt
2021-10-13  2:04     ` 王贇
2021-10-13  2:30       ` Steven Rostedt
2021-10-13  2:38         ` 王贇
2021-10-12  5:40 ` [PATCH 2/2] ftrace: prevent preemption in perf_ftrace_function_call() 王贇
2021-10-12 11:20   ` Peter Zijlstra
2021-10-13  1:45     ` 王贇
2021-10-12  5:41 ` [PATCH 0/2] ftrace: make sure preemption disabled on recursion testing 王贇
2021-10-13  3:16 ` [PATCH v2 0/2] fix & prevent the missing preemption disabling 王贇
2021-10-13  3:17   ` [PATCH v2 1/2] ftrace: disable preemption between ftrace_test_recursion_trylock/unlock() 王贇
2021-10-13  3:18   ` [PATCH v2 2/2] ftrace: do CPU checking after preemption disabled 王贇
2021-10-13  3:26   ` [PATCH v2 0/2] fix & prevent the missing preemption disabling Steven Rostedt
2021-10-13  3:33     ` 王贇
2021-10-26 23:48 ` [PATCH 0/2] ftrace: make sure preemption disabled on recursion testing Palmer Dabbelt

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).