linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 0/7] uprobe, bpf: Add session support
@ 2024-09-09  7:45 Jiri Olsa
  2024-09-09  7:45 ` [PATCHv3 1/7] uprobe: Add support for session consumer Jiri Olsa
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Jiri Olsa @ 2024-09-09  7:45 UTC (permalink / raw)
  To: Oleg Nesterov, Peter Zijlstra, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko
  Cc: bpf, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Steven Rostedt,
	Masami Hiramatsu, linux-kernel, linux-trace-kernel

hi,
this patchset is adding support for session uprobe attachment and
using it through bpf link for bpf programs.

The session means that the uprobe consumer is executed on entry
and return of probed function with additional control:
  - entry callback can control execution of the return callback
  - entry and return callbacks can share data/cookie

On more details please see patch #1.

It's based on Peter's perf/core:
  git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core


v3 changes:
  - rebased on top of Andrii's recent changes in Peter's perf/core [2]
  - I kept the session cookie instead of introducing generic session
    data, because it makes the change much more complicated, I think
    it can be added as a followup if it's needed
  - addressed several small review fixes [Andrii]
  - added uprobe.session.s section and test [Andrii]
  - kept acks from previous version on patches that did not change

thanks,
jirka


---
Jiri Olsa (7):
      uprobe: Add support for session consumer
      bpf: Add support for uprobe multi session attach
      bpf: Add support for uprobe multi session context
      libbpf: Add support for uprobe multi session attach
      selftests/bpf: Add uprobe session test
      selftests/bpf: Add uprobe session cookie test
      selftests/bpf: Add uprobe session recursive test

 include/linux/uprobes.h                                            |  17 +++++++++--
 include/uapi/linux/bpf.h                                           |   1 +
 kernel/bpf/syscall.c                                               |   9 ++++--
 kernel/events/uprobes.c                                            | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
 kernel/trace/bpf_trace.c                                           |  59 ++++++++++++++++++++++++++-----------
 kernel/trace/trace_uprobe.c                                        |  12 +++++---
 tools/include/uapi/linux/bpf.h                                     |   1 +
 tools/lib/bpf/bpf.c                                                |   1 +
 tools/lib/bpf/libbpf.c                                             |  51 ++++++++++++++++++++++++++++++--
 tools/lib/bpf/libbpf.h                                             |   4 ++-
 tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c              |   2 +-
 tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c         | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/uprobe_multi_session.c           |  71 ++++++++++++++++++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/uprobe_multi_session_cookie.c    |  48 ++++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/uprobe_multi_session_recursive.c |  44 ++++++++++++++++++++++++++++
 15 files changed, 531 insertions(+), 56 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_session.c
 create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_session_cookie.c
 create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_session_recursive.c

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

end of thread, other threads:[~2024-09-13 11:52 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09  7:45 [PATCHv3 0/7] uprobe, bpf: Add session support Jiri Olsa
2024-09-09  7:45 ` [PATCHv3 1/7] uprobe: Add support for session consumer Jiri Olsa
2024-09-09 23:44   ` Andrii Nakryiko
2024-09-10  7:17     ` Jiri Olsa
2024-09-10 14:10   ` Masami Hiramatsu
2024-09-11 11:48     ` Jiri Olsa
2024-09-12 16:20   ` Oleg Nesterov
2024-09-13  8:22     ` Jiri Olsa
2024-09-13 10:07       ` Oleg Nesterov
2024-09-13 10:57       ` Oleg Nesterov
2024-09-13 11:34         ` Jiri Olsa
2024-09-13 11:41           ` Oleg Nesterov
2024-09-12 16:35   ` Oleg Nesterov
2024-09-13  8:36     ` Jiri Olsa
2024-09-13  9:32       ` Oleg Nesterov
2024-09-13 10:17         ` Jiri Olsa
2024-09-13 11:52   ` Oleg Nesterov
2024-09-09  7:45 ` [PATCHv3 2/7] bpf: Add support for uprobe multi session attach Jiri Olsa
2024-09-09 23:44   ` Andrii Nakryiko
2024-09-10  7:17     ` Jiri Olsa
2024-09-10 18:09       ` Andrii Nakryiko
2024-09-09  7:45 ` [PATCHv3 3/7] bpf: Add support for uprobe multi session context Jiri Olsa
2024-09-09  7:45 ` [PATCHv3 4/7] libbpf: Add support for uprobe multi session attach Jiri Olsa
2024-09-09 23:44   ` Andrii Nakryiko
2024-09-10  7:17     ` Jiri Olsa
2024-09-09  7:45 ` [PATCHv3 5/7] selftests/bpf: Add uprobe session test Jiri Olsa
2024-09-09 23:45   ` Andrii Nakryiko
2024-09-10  7:17     ` Jiri Olsa
2024-09-09  7:45 ` [PATCHv3 6/7] selftests/bpf: Add uprobe session cookie test Jiri Olsa
2024-09-09  7:45 ` [PATCHv3 7/7] selftests/bpf: Add uprobe session recursive test Jiri Olsa

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