linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH perf/core 00/11] uprobes: Add unique uprobe
@ 2025-09-02 14:34 Jiri Olsa
  2025-09-02 14:34 ` [PATCH perf/core 01/11] uprobes: Add unique flag to uprobe consumer Jiri Olsa
                   ` (10 more replies)
  0 siblings, 11 replies; 38+ messages in thread
From: Jiri Olsa @ 2025-09-02 14:34 UTC (permalink / raw)
  To: Oleg Nesterov, Masami Hiramatsu, Peter Zijlstra, Andrii Nakryiko
  Cc: bpf, linux-kernel, linux-trace-kernel, x86, Song Liu,
	Yonghong Song, John Fastabend, Hao Luo, Steven Rostedt,
	Ingo Molnar

hi,
this patchset adds unique uprobe and support to change userspace
task's registers from within bpf uprobe program.

We recently had several requests for tetragon to be able to change
user application function return value or divert its execution through
instruction pointer change.

v1 changes (from rfc [1]):
- added unique probe support
- added more tests

thanks,
jirka


[1] https://lore.kernel.org/bpf/20250801210238.2207429-1-jolsa@kernel.org/
---
Jiri Olsa (11):
      uprobes: Add unique flag to uprobe consumer
      uprobes: Skip emulate/sstep on unique uprobe when ip is changed
      perf: Add support to attach standard unique uprobe
      bpf: Add support to attach uprobe_multi unique uprobe
      bpf: Allow uprobe program to change context registers
      libbpf: Add support to attach unique uprobe_multi uprobe
      libbpf: Add support to attach generic unique uprobe
      selftests/bpf: Add uprobe multi context registers changes test
      selftests/bpf: Add uprobe multi context ip register change test
      selftests/bpf: Add uprobe multi unique attach test
      selftests/bpf: Add uprobe unique attach test

 include/linux/bpf.h                                        |   1 +
 include/linux/trace_events.h                               |   2 +-
 include/linux/uprobes.h                                    |   1 +
 include/uapi/linux/bpf.h                                   |   3 +-
 kernel/events/core.c                                       |  12 ++++-
 kernel/events/uprobes.c                                    |  43 ++++++++++++++--
 kernel/trace/bpf_trace.c                                   |   7 +--
 kernel/trace/trace_event_perf.c                            |   4 +-
 kernel/trace/trace_probe.h                                 |   2 +-
 kernel/trace/trace_uprobe.c                                |   9 ++--
 tools/include/uapi/linux/bpf.h                             |   3 +-
 tools/lib/bpf/libbpf.c                                     |  36 +++++++++++---
 tools/lib/bpf/libbpf.h                                     |   8 ++-
 tools/testing/selftests/bpf/prog_tests/bpf_cookie.c        |   1 +
 tools/testing/selftests/bpf/prog_tests/uprobe.c            | 111 ++++++++++++++++++++++++++++++++++++++++-
 tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c | 248 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/uprobe_multi.c           |  38 ++++++++++++++
 tools/testing/selftests/bpf/progs/uprobe_multi_unique.c    |  34 +++++++++++++
 18 files changed, 534 insertions(+), 29 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_unique.c

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

end of thread, other threads:[~2025-09-05  8:53 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 14:34 [PATCH perf/core 00/11] uprobes: Add unique uprobe Jiri Olsa
2025-09-02 14:34 ` [PATCH perf/core 01/11] uprobes: Add unique flag to uprobe consumer Jiri Olsa
2025-09-02 15:11   ` Masami Hiramatsu
2025-09-03  6:35     ` Jiri Olsa
2025-09-03 10:49   ` Oleg Nesterov
2025-09-03 12:02     ` Jiri Olsa
2025-09-02 14:34 ` [PATCH perf/core 02/11] uprobes: Skip emulate/sstep on unique uprobe when ip is changed Jiri Olsa
2025-09-03 11:26   ` Oleg Nesterov
2025-09-03 18:20     ` Andrii Nakryiko
2025-09-03 19:57       ` Jiri Olsa
2025-09-03 19:50     ` Jiri Olsa
2025-09-04  8:49       ` Oleg Nesterov
2025-09-04 10:46         ` Jiri Olsa
2025-09-04 11:23           ` Oleg Nesterov
2025-09-04 15:01             ` Alexei Starovoitov
2025-09-04 18:06               ` Andrii Nakryiko
2025-09-04 18:55                 ` Oleg Nesterov
2025-09-04 19:42                   ` Andrii Nakryiko
2025-09-05  8:51                     ` Oleg Nesterov
2025-09-02 14:34 ` [PATCH perf/core 03/11] perf: Add support to attach standard unique uprobe Jiri Olsa
2025-09-02 16:13   ` Alexei Starovoitov
2025-09-03  3:32   ` kernel test robot
2025-09-03 11:59   ` Oleg Nesterov
2025-09-03 13:03     ` Jiri Olsa
2025-09-03 13:22       ` Oleg Nesterov
2025-09-02 14:34 ` [PATCH perf/core 04/11] bpf: Add support to attach uprobe_multi " Jiri Olsa
2025-09-02 16:11   ` Alexei Starovoitov
2025-09-03  6:35     ` Jiri Olsa
2025-09-03 15:32       ` Alexei Starovoitov
2025-09-03 19:55         ` Jiri Olsa
2025-09-02 14:34 ` [PATCH perf/core 05/11] bpf: Allow uprobe program to change context registers Jiri Olsa
2025-09-02 14:34 ` [PATCH perf/core 06/11] libbpf: Add support to attach unique uprobe_multi uprobe Jiri Olsa
2025-09-02 14:35 ` [PATCH perf/core 07/11] libbpf: Add support to attach generic unique uprobe Jiri Olsa
2025-09-03 18:26   ` Andrii Nakryiko
2025-09-02 14:35 ` [PATCH perf/core 08/11] selftests/bpf: Add uprobe multi context registers changes test Jiri Olsa
2025-09-02 14:35 ` [PATCH perf/core 09/11] selftests/bpf: Add uprobe multi context ip register change test Jiri Olsa
2025-09-02 14:35 ` [PATCH perf/core 10/11] selftests/bpf: Add uprobe multi unique attach test Jiri Olsa
2025-09-02 14:35 ` [PATCH perf/core 11/11] selftests/bpf: Add uprobe " 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).