[PATCH bpf-next 0/3] LINK_CREATE support for fentry/tp_btf/lsm attachments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wire up ability to attach bpf_link-based fentry/fexit/fmod_ret, tp_btf
(BTF-aware raw tracepoints), and LSM programs through universal LINK_CREATE
command, in addition to current BPF_RAW_TRACEPOINT_OPEN.

Teach libbpf to handle this LINK_CREATE/BPF_RAW_TRACEPOINT_OPEN split on older
kernels transparently in universal low-level bpf_link_create() API for users
convenience.

Patch #3 converts fexit_stress selftest to bpf_link_create().

libbpf CI will be testing this fallback logic on older kernels.

Cc: Kui-Feng Lee <kuifeng@xxxxxx>

Andrii Nakryiko (3):
  bpf: allow attach TRACING programs through LINK_CREATE command
  libbpf: teach bpf_link_create() to fallback to
    bpf_raw_tracepoint_open()
  selftests/bpf: switch fexit_stress to bpf_link_create() API

 kernel/bpf/syscall.c                          | 110 +++++++++---------
 tools/lib/bpf/bpf.c                           |  34 +++++-
 tools/lib/bpf/libbpf.c                        |   3 +-
 .../selftests/bpf/prog_tests/fexit_stress.c   |   2 +-
 4 files changed, 91 insertions(+), 58 deletions(-)

-- 
2.30.2




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux