bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] libbpf: Add syscall-specific variants of BPF_KPROBE/BPF_KRETPROBE
@ 2021-12-21  5:53 Hengqi Chen
  2021-12-21  5:53 ` [PATCH bpf-next 1/2] libbpf: Add BPF_KPROBE_SYSCALL/BPF_KRETPROBE_SYSCALL macros Hengqi Chen
  2021-12-21  5:53 ` [PATCH bpf-next 2/2] selftests/bpf: Test " Hengqi Chen
  0 siblings, 2 replies; 10+ messages in thread
From: Hengqi Chen @ 2021-12-21  5:53 UTC (permalink / raw)
  To: bpf, andrii, hengqi.chen

Add new macros BPF_KPROBE_SYSCALL/BPF_KRETPROBE_SYSCALL, which provides
easy access to syscall input arguments and return values. See [0] and [1]
for background.

  [0]: https://github.com/libbpf/libbpf-bootstrap/issues/57
  [1]: https://github.com/libbpf/libbpf/issues/425

Hengqi Chen (2):
  libbpf: Add BPF_KPROBE_SYSCALL/BPF_KRETPROBE_SYSCALL macros
  selftests/bpf: Test BPF_KPROBE_SYSCALL/BPF_KRETPROBE_SYSCALL macros

 tools/lib/bpf/bpf_tracing.h                   | 45 +++++++++++++++++++
 .../selftests/bpf/prog_tests/kprobe_syscall.c | 40 +++++++++++++++++
 .../selftests/bpf/progs/test_kprobe_syscall.c | 41 +++++++++++++++++
 3 files changed, 126 insertions(+)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/kprobe_syscall.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_kprobe_syscall.c

--
2.30.2

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

end of thread, other threads:[~2022-01-06 20:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-21  5:53 [PATCH bpf-next 0/2] libbpf: Add syscall-specific variants of BPF_KPROBE/BPF_KRETPROBE Hengqi Chen
2021-12-21  5:53 ` [PATCH bpf-next 1/2] libbpf: Add BPF_KPROBE_SYSCALL/BPF_KRETPROBE_SYSCALL macros Hengqi Chen
2021-12-21 15:53   ` Yonghong Song
2021-12-22  0:18   ` Andrii Nakryiko
2021-12-23 12:11     ` Hengqi Chen
2022-01-06 20:27       ` Andrii Nakryiko
2021-12-21  5:53 ` [PATCH bpf-next 2/2] selftests/bpf: Test " Hengqi Chen
2021-12-22  0:34   ` Andrii Nakryiko
2021-12-22  0:37   ` Andrii Nakryiko
2021-12-23 12:16     ` Hengqi Chen

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