linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC bpf-next 00/10] uprobe, bpf: Add session support
@ 2024-06-04 20:02 Jiri Olsa
  2024-06-04 20:02 ` [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer Jiri Olsa
                   ` (9 more replies)
  0 siblings, 10 replies; 28+ messages in thread
From: Jiri Olsa @ 2024-06-04 20:02 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.

thanks,
jirka


---
Jiri Olsa (10):
      uprobe: Add session callbacks to uprobe_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
      libbpf: Add uprobe session attach type names to attach_type_name
      selftests/bpf: Move ARRAY_SIZE to bpf_misc.h
      selftests/bpf: Add uprobe session test
      selftests/bpf: Add uprobe session errors test
      selftests/bpf: Add uprobe session cookie test
      selftests/bpf: Add uprobe session recursive test

 include/linux/uprobes.h                                            |  18 ++++++++++
 include/uapi/linux/bpf.h                                           |   1 +
 kernel/bpf/syscall.c                                               |   9 +++--
 kernel/events/uprobes.c                                            |  69 +++++++++++++++++++++++++++++++++-----
 kernel/trace/bpf_trace.c                                           |  72 +++++++++++++++++++++++++++++++---------
 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/prog_tests/uprobe_multi_test.c         | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/bpf_misc.h                       |   2 ++
 tools/testing/selftests/bpf/progs/iters.c                          |   2 --
 tools/testing/selftests/bpf/progs/kprobe_multi_session.c           |   3 +-
 tools/testing/selftests/bpf/progs/linked_list.c                    |   5 +--
 tools/testing/selftests/bpf/progs/netif_receive_skb.c              |   5 +--
 tools/testing/selftests/bpf/progs/profiler.inc.h                   |   5 +--
 tools/testing/selftests/bpf/progs/setget_sockopt.c                 |   5 +--
 tools/testing/selftests/bpf/progs/test_bpf_ma.c                    |   4 ---
 tools/testing/selftests/bpf/progs/test_sysctl_loop1.c              |   5 +--
 tools/testing/selftests/bpf/progs/test_sysctl_loop2.c              |   5 +--
 tools/testing/selftests/bpf/progs/test_sysctl_prog.c               |   5 +--
 tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c      |   1 +
 tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.h      |   2 --
 tools/testing/selftests/bpf/progs/uprobe_multi_session.c           |  52 +++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/uprobe_multi_session_cookie.c    |  50 ++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/uprobe_multi_session_recursive.c |  44 ++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/verifier_subprog_precision.c     |   2 --
 27 files changed, 507 insertions(+), 69 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] 28+ messages in thread

end of thread, other threads:[~2024-06-19 18:48 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04 20:02 [RFC bpf-next 00/10] uprobe, bpf: Add session support Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 01/10] uprobe: Add session callbacks to uprobe_consumer Jiri Olsa
2024-06-05 15:24   ` Oleg Nesterov
2024-06-05 16:01     ` Oleg Nesterov
2024-06-05 16:36       ` Oleg Nesterov
2024-06-05 20:18         ` Jiri Olsa
2024-06-05 17:25   ` Andrii Nakryiko
2024-06-05 17:56     ` Oleg Nesterov
2024-06-05 20:47       ` Andrii Nakryiko
2024-06-05 21:17         ` Jiri Olsa
2024-06-05 21:23         ` Oleg Nesterov
2024-06-05 20:50       ` Jiri Olsa
2024-06-05 21:00         ` Oleg Nesterov
2024-06-06 16:46         ` Jiri Olsa
2024-06-06 16:52           ` Andrii Nakryiko
2024-06-10 11:06             ` Jiri Olsa
2024-06-17 22:53               ` Andrii Nakryiko
2024-06-19 18:48                 ` Jiri Olsa
2024-06-05 21:01     ` Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 02/10] bpf: Add support for uprobe multi session attach Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 03/10] bpf: Add support for uprobe multi session context Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 04/10] libbpf: Add support for uprobe multi session attach Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 05/10] libbpf: Add uprobe session attach type names to attach_type_name Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 06/10] selftests/bpf: Move ARRAY_SIZE to bpf_misc.h Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 07/10] selftests/bpf: Add uprobe session test Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 08/10] selftests/bpf: Add uprobe session errors test Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 09/10] selftests/bpf: Add uprobe session cookie test Jiri Olsa
2024-06-04 20:02 ` [RFC bpf-next 10/10] 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).