linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] libbpf: allow users to set kprobe/uprobe attach mode
@ 2023-02-20  8:47 menglong8.dong
  2023-02-20  8:47 ` [PATCH bpf-next v2 1/3] libbpf: add support " menglong8.dong
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: menglong8.dong @ 2023-02-20  8:47 UTC (permalink / raw)
  To: andrii.nakryiko, alan.maguire
  Cc: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa, bpf, linux-kernel, Menglong Dong

From: Menglong Dong <imagedong@tencent.com>

By default, libbpf will attach the kprobe/uprobe eBPF program in the
latest mode that supported by kernel. In this series, we add the support
to let users manually attach kprobe/uprobe in legacy/perf/link mode in
the 1th patch.

And in the 2th patch, we split the testing 'attach_probe' into multi
subtests, as Andrii suggested.

In the 3th patch, we add the testings for loading kprobe/uprobe in
different mode.

Changes since v1:
- some small changes in the 1th patch, as Andrii suggested
- split 'attach_probe' into multi subtests

Menglong Dong (3):
  libbpf: add support to set kprobe/uprobe attach mode
  selftests/bpf: split test_attach_probe into multi subtests
  selftests/bpf: add test for legacy/perf kprobe/uprobe attach mode

 tools/lib/bpf/libbpf.c                        |  42 ++-
 tools/lib/bpf/libbpf.h                        |  31 +-
 .../selftests/bpf/prog_tests/attach_probe.c   | 283 ++++++++++++------
 .../bpf/progs/test_attach_kprobe_sleepable.c  |  23 ++
 .../selftests/bpf/progs/test_attach_probe.c   |  45 +--
 .../bpf/progs/test_attach_probe_manual.c      |  53 ++++
 6 files changed, 337 insertions(+), 140 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/test_attach_kprobe_sleepable.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_attach_probe_manual.c

-- 
2.39.0


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

end of thread, other threads:[~2023-02-21  2:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  8:47 [PATCH bpf-next v2 0/3] libbpf: allow users to set kprobe/uprobe attach mode menglong8.dong
2023-02-20  8:47 ` [PATCH bpf-next v2 1/3] libbpf: add support " menglong8.dong
2023-02-20  8:47 ` [PATCH bpf-next v2 2/3] selftests/bpf: split test_attach_probe into multi subtests menglong8.dong
2023-02-20 11:40   ` Alan Maguire
2023-02-21  2:19     ` Menglong Dong
2023-02-20  8:47 ` [PATCH bpf-next v2 3/3] selftests/bpf: add test for legacy/perf kprobe/uprobe attach mode menglong8.dong

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