linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/8] tracing: Allow system call tracepoints to handle page faults
@ 2024-10-03 15:16 Mathieu Desnoyers
  2024-10-03 15:16 ` [PATCH v1 1/8] tracing: Declare system call tracepoints with TRACE_EVENT_SYSCALL Mathieu Desnoyers
                   ` (7 more replies)
  0 siblings, 8 replies; 40+ messages in thread
From: Mathieu Desnoyers @ 2024-10-03 15:16 UTC (permalink / raw)
  To: Steven Rostedt, Masami Hiramatsu
  Cc: linux-kernel, Mathieu Desnoyers, Peter Zijlstra,
	Alexei Starovoitov, Yonghong Song, Paul E . McKenney, Ingo Molnar,
	Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
	Namhyung Kim, Andrii Nakryiko, bpf, Joel Fernandes,
	linux-trace-kernel

Wire up the system call tracepoints with Tasks Trace RCU to allow
the ftrace, perf, and eBPF tracers to handle page faults.

This series does the initial wire-up allowing tracers to handle page
faults, but leaves out the actual handling of said page faults as future
work.

This series was compile and runtime tested with ftrace and perf syscall
tracing and raw syscall tracing, adding a WARN_ON_ONCE() in the
generated code to validate that the intended probes are used for raw
syscall tracing. The might_fault() added within those probes validate
that they are called from a context where handling a page fault is OK.

This series replaces the "Faultable Tracepoints v6" series found at [1].

This has been rebased on v6.12-rc1, without any conflicts. I have fixed
the build bot warnings, those were caused by build error with
CONFIG_TRACING=n. I've added the Acked-by and Tested-by tags to relevant
commits.

Steven, can you merge it through the tracing tree ?

Thanks,

Mathieu

Link: https://lore.kernel.org/lkml/20240828144153.829582-1-mathieu.desnoyers@efficios.com/ # [1]
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Yonghong Song <yhs@fb.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf@vger.kernel.org
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: linux-trace-kernel@vger.kernel.org

Mathieu Desnoyers (8):
  tracing: Declare system call tracepoints with TRACE_EVENT_SYSCALL
  tracing/ftrace: guard syscall probe with preempt_notrace
  tracing/perf: guard syscall probe with preempt_notrace
  tracing/bpf: guard syscall probe with preempt_notrace
  tracing: Allow system call tracepoints to handle page faults
  tracing/ftrace: Add might_fault check to syscall probes
  tracing/perf: Add might_fault check to syscall probes
  tracing/bpf: Add might_fault check to syscall probes

 include/linux/tracepoint.h      | 104 ++++++++++++++++++++++++++++----
 include/trace/bpf_probe.h       |  13 ++++
 include/trace/define_trace.h    |   5 ++
 include/trace/events/syscalls.h |   4 +-
 include/trace/perf.h            |  43 ++++++++++++-
 include/trace/trace_events.h    |  61 +++++++++++++++++--
 init/Kconfig                    |   1 +
 kernel/entry/common.c           |   4 +-
 kernel/trace/trace_syscalls.c   |  44 +++++++++++---
 9 files changed, 247 insertions(+), 32 deletions(-)

-- 
2.39.2

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

end of thread, other threads:[~2024-10-04 20:58 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 15:16 [PATCH v1 0/8] tracing: Allow system call tracepoints to handle page faults Mathieu Desnoyers
2024-10-03 15:16 ` [PATCH v1 1/8] tracing: Declare system call tracepoints with TRACE_EVENT_SYSCALL Mathieu Desnoyers
2024-10-03 21:32   ` Steven Rostedt
2024-10-04  0:15     ` Mathieu Desnoyers
2024-10-04  1:06       ` Steven Rostedt
2024-10-04  1:34         ` Mathieu Desnoyers
2024-10-04 10:34   ` kernel test robot
2024-10-03 15:16 ` [PATCH v1 2/8] tracing/ftrace: guard syscall probe with preempt_notrace Mathieu Desnoyers
2024-10-03 22:23   ` Steven Rostedt
2024-10-04  0:26     ` Mathieu Desnoyers
2024-10-04  1:04       ` Steven Rostedt
2024-10-04  1:33         ` Mathieu Desnoyers
2024-10-04 13:26           ` Steven Rostedt
2024-10-04 14:18             ` Mathieu Desnoyers
2024-10-04 14:45               ` Steven Rostedt
2024-10-04 14:19             ` Mathieu Desnoyers
2024-10-04 14:52               ` Steven Rostedt
2024-10-04 14:51                 ` Mathieu Desnoyers
2024-10-04 20:04                   ` Andrii Nakryiko
2024-10-04 20:59                     ` Steven Rostedt
2024-10-03 15:16 ` [PATCH v1 3/8] tracing/perf: " Mathieu Desnoyers
2024-10-03 22:25   ` Steven Rostedt
2024-10-04  0:17     ` Frederic Weisbecker
2024-10-03 15:16 ` [PATCH v1 4/8] tracing/bpf: " Mathieu Desnoyers
2024-10-03 22:26   ` Steven Rostedt
2024-10-03 23:05     ` Alexei Starovoitov
2024-10-04  0:30       ` Mathieu Desnoyers
2024-10-04  1:28         ` Mathieu Desnoyers
2024-10-03 15:16 ` [PATCH v1 5/8] tracing: Allow system call tracepoints to handle page faults Mathieu Desnoyers
2024-10-03 22:29   ` Steven Rostedt
2024-10-04  0:35     ` Mathieu Desnoyers
2024-10-03 15:16 ` [PATCH v1 6/8] tracing/ftrace: Add might_fault check to syscall probes Mathieu Desnoyers
2024-10-03 22:36   ` Steven Rostedt
2024-10-04  0:11     ` Mathieu Desnoyers
2024-10-03 15:16 ` [PATCH v1 7/8] tracing/perf: " Mathieu Desnoyers
2024-10-03 22:37   ` Steven Rostedt
2024-10-04  0:12     ` Mathieu Desnoyers
2024-10-03 15:16 ` [PATCH v1 8/8] tracing/bpf: " Mathieu Desnoyers
2024-10-03 22:38   ` Steven Rostedt
2024-10-04  0:13     ` Mathieu Desnoyers

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