public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii@kernel.org>
To: <bpf@vger.kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>
Cc: <andrii@kernel.org>, <kernel-team@fb.com>, Kui-Feng Lee <kuifeng@fb.com>
Subject: [PATCH bpf-next 0/3] LINK_CREATE support for fentry/tp_btf/lsm attachments
Date: Wed, 20 Apr 2022 20:39:42 -0700	[thread overview]
Message-ID: <20220421033945.3602803-1-andrii@kernel.org> (raw)

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@fb.com>

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


             reply	other threads:[~2022-04-21  3:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  3:39 Andrii Nakryiko [this message]
2022-04-21  3:39 ` [PATCH bpf-next 1/3] bpf: allow attach TRACING programs through LINK_CREATE command Andrii Nakryiko
2022-04-22 20:55   ` Kui-Feng Lee
2022-04-21  3:39 ` [PATCH bpf-next 2/3] libbpf: teach bpf_link_create() to fallback to bpf_raw_tracepoint_open() Andrii Nakryiko
2022-04-22 20:57   ` Kui-Feng Lee
2022-04-21  3:39 ` [PATCH bpf-next 3/3] selftests/bpf: switch fexit_stress to bpf_link_create() API Andrii Nakryiko
2022-04-22 21:02   ` Kui-Feng Lee
2022-04-22 22:40 ` [PATCH bpf-next 0/3] LINK_CREATE support for fentry/tp_btf/lsm attachments patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220421033945.3602803-1-andrii@kernel.org \
    --to=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=kuifeng@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox