BPF List
 help / color / mirror / Atom feed
* [PATCH bpf 0/5] Fix BPF multi-uprobe PID filtering logic
@ 2024-05-20 23:47 Andrii Nakryiko
  2024-05-20 23:47 ` [PATCH bpf 1/5] bpf: fix " Andrii Nakryiko
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Andrii Nakryiko @ 2024-05-20 23:47 UTC (permalink / raw)
  To: bpf, ast, daniel, martin.lau; +Cc: andrii, kernel-team

It turns out that current implementation of multi-uprobe PID filtering logic
is broken. It filters by thread, while the promise is filtering by process.
Patch #1 fixes the logic trivially. The rest is testing and mitigations that
are necessary for libbpf to not break users of USDT programs.

Andrii Nakryiko (5):
  bpf: fix multi-uprobe PID filtering logic
  bpf: remove unnecessary rcu_read_{lock,unlock}() in multi-uprobe
    attach logic
  libbpf: detect broken PID filtering logic for multi-uprobe
  selftests/bpf: extend multi-uprobe tests with child thread case
  selftests/bpf: extend multi-uprobe tests with USDTs

 kernel/trace/bpf_trace.c                      |  10 +-
 tools/lib/bpf/features.c                      |  31 ++++-
 .../bpf/prog_tests/uprobe_multi_test.c        | 131 ++++++++++++++++--
 .../selftests/bpf/progs/uprobe_multi.c        |  50 ++++++-
 4 files changed, 203 insertions(+), 19 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-05-21 16:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 23:47 [PATCH bpf 0/5] Fix BPF multi-uprobe PID filtering logic Andrii Nakryiko
2024-05-20 23:47 ` [PATCH bpf 1/5] bpf: fix " Andrii Nakryiko
2024-05-21 10:04   ` Jiri Olsa
2024-05-20 23:47 ` [PATCH bpf 2/5] bpf: remove unnecessary rcu_read_{lock,unlock}() in multi-uprobe attach logic Andrii Nakryiko
2024-05-21 10:04   ` Jiri Olsa
2024-05-20 23:47 ` [PATCH bpf 3/5] libbpf: detect broken PID filtering logic for multi-uprobe Andrii Nakryiko
2024-05-21 10:04   ` Jiri Olsa
2024-05-21 16:12     ` Andrii Nakryiko
2024-05-20 23:47 ` [PATCH bpf 4/5] selftests/bpf: extend multi-uprobe tests with child thread case Andrii Nakryiko
2024-05-20 23:47 ` [PATCH bpf 5/5] selftests/bpf: extend multi-uprobe tests with USDTs Andrii Nakryiko
2024-05-21  4:54   ` Andrii Nakryiko
2024-05-21  5:05     ` Alexei Starovoitov
2024-05-21 10:04     ` Jiri Olsa
2024-05-21 16:13       ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox