bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] libbpf: add legacy uprobe support
@ 2021-09-20 23:16 Andrii Nakryiko
  2021-09-20 23:16 ` [PATCH bpf-next 1/4] libbpf: fix memory leak in legacy kprobe attach logic Andrii Nakryiko
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Andrii Nakryiko @ 2021-09-20 23:16 UTC (permalink / raw)
  To: bpf, ast, daniel; +Cc: andrii, kernel-team

Implement libbpf support for attaching uprobes/uretprobes using legacy
tracefs interfaces. This is a logical complement to recently landed legacy
kprobe support ([0]). This patch refactors existing legacy kprobe code to be more
uniform with uprobe code as well, making the logic easier to compare and
follow.

This patch set also fixes two bugs recently found by Coverity in legacy kprobe
handling code, and thus subsumes previously submitted two patches ([1]):
original patch #1 is kept as is, while original patch #2 was dropped because
patch #3 of the current series refactors and fixes affected code.

  [0] https://patchwork.kernel.org/project/netdevbpf/patch/20210912064844.3181742-1-rafaeldtinoco@gmail.com/
  [1] https://patchwork.kernel.org/project/netdevbpf/list/?series=549977&state=*

Andrii Nakryiko (4):
  libbpf: fix memory leak in legacy kprobe attach logic
  selftests/bpf: adopt attach_probe selftest to work on old kernels
  libbpf: refactor and simplify legacy kprobe code
  libbpf: add legacy uprobe attaching support

 tools/lib/bpf/libbpf.c                        | 297 +++++++++++++-----
 tools/lib/bpf/libbpf.h                        |   2 +-
 .../selftests/bpf/prog_tests/attach_probe.c   |  16 +-
 3 files changed, 228 insertions(+), 87 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-09-21 20:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20 23:16 [PATCH bpf-next 0/4] libbpf: add legacy uprobe support Andrii Nakryiko
2021-09-20 23:16 ` [PATCH bpf-next 1/4] libbpf: fix memory leak in legacy kprobe attach logic Andrii Nakryiko
2021-09-20 23:16 ` [PATCH bpf-next 2/4] selftests/bpf: adopt attach_probe selftest to work on old kernels Andrii Nakryiko
2021-09-21 20:34   ` Alexei Starovoitov
2021-09-21 20:46     ` Andrii Nakryiko
2021-09-21 20:48       ` Alexei Starovoitov
2021-09-21 20:53         ` Andrii Nakryiko
2021-09-20 23:16 ` [PATCH bpf-next 3/4] libbpf: refactor and simplify legacy kprobe code Andrii Nakryiko
2021-09-20 23:16 ` [PATCH bpf-next 4/4] libbpf: add legacy uprobe attaching support Andrii Nakryiko

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