From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Eduard Zingerman <eddyz87@gmail.com>,
Emil Tsalapatis <emil@etsalapatis.com>, Tejun Heo <tj@kernel.org>,
kkd@meta.com, kernel-team@meta.com
Subject: [PATCH bpf-next v1 0/9] Add arena argument support to kfuncs and struct_ops
Date: Thu, 16 Jul 2026 00:00:40 +0200 [thread overview]
Message-ID: <20260715220052.1590783-1-memxor@gmail.com> (raw)
This is a continuation of patches in [0], with mostly minor changes and
reordering. The motivation is covered in that link. A major change is
moving to two tags (__arena and __arena_nullable) and moving the changes
to JIT to emit more optimized sequences.
Please see commit logs for details.
[0]: https://lore.kernel.org/bpf/20260713024414.3759854-1-tj@kernel.org
Tejun Heo (9):
bpf: Support __arena and __arena_nullable kfunc argument suffixes
bpf: Support __arena and __arena_nullable on struct_ops stub arguments
bpf, x86: JIT __arena kfunc argument rebasing
bpf, x86: Convert struct_ops arena arguments in the trampoline
selftests/bpf: Add kfunc __arena and __arena_nullable argument tests
selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments
selftests/bpf: Add struct_ops __arena and __arena_nullable argument
tests
bpf, x86: Fix stack-passed arguments for indirect trampolines
selftests/bpf: Test stack-passed struct_ops arena arguments
Documentation/bpf/kfuncs.rst | 39 +++
arch/x86/net/bpf_jit_comp.c | 128 ++++++++-
include/linux/bpf.h | 28 ++
include/linux/bpf_verifier.h | 4 +
include/linux/filter.h | 1 +
kernel/bpf/bpf_struct_ops.c | 34 ++-
kernel/bpf/btf.c | 10 +-
kernel/bpf/core.c | 18 ++
kernel/bpf/trampoline.c | 64 +++++
kernel/bpf/verifier.c | 65 ++++-
.../selftests/bpf/prog_tests/arena_kfunc.c | 15 ++
.../bpf/prog_tests/arena_kfunc_jit.c | 13 +
.../bpf/prog_tests/test_struct_ops_arena.c | 72 +++++
.../testing/selftests/bpf/progs/arena_kfunc.c | 250 ++++++++++++++++++
.../selftests/bpf/progs/arena_kfunc_jit.c | 96 +++++++
.../selftests/bpf/progs/struct_ops_arena.c | 115 ++++++++
.../bpf/progs/struct_ops_arena_fail.c | 20 ++
.../selftests/bpf/test_kmods/bpf_testmod.c | 95 +++++++
.../selftests/bpf/test_kmods/bpf_testmod.h | 6 +
.../bpf/test_kmods/bpf_testmod_kfunc.h | 13 +
20 files changed, 1055 insertions(+), 31 deletions(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/arena_kfunc.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/arena_kfunc_jit.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/test_struct_ops_arena.c
create mode 100644 tools/testing/selftests/bpf/progs/arena_kfunc.c
create mode 100644 tools/testing/selftests/bpf/progs/arena_kfunc_jit.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_arena.c
create mode 100644 tools/testing/selftests/bpf/progs/struct_ops_arena_fail.c
base-commit: d1f4b56417a3dc1a0600f960b14f46bd25eda89d
--
2.53.0
next reply other threads:[~2026-07-15 22:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 22:00 Kumar Kartikeya Dwivedi [this message]
2026-07-15 22:00 ` [PATCH bpf-next v1 1/9] bpf: Support __arena and __arena_nullable kfunc argument suffixes Kumar Kartikeya Dwivedi
2026-07-15 23:05 ` bot+bpf-ci
2026-07-16 11:31 ` Kumar Kartikeya Dwivedi
2026-07-15 22:00 ` [PATCH bpf-next v1 2/9] bpf: Support __arena and __arena_nullable on struct_ops stub arguments Kumar Kartikeya Dwivedi
2026-07-15 22:22 ` sashiko-bot
2026-07-15 22:00 ` [PATCH bpf-next v1 3/9] bpf, x86: JIT __arena kfunc argument rebasing Kumar Kartikeya Dwivedi
2026-07-15 22:00 ` [PATCH bpf-next v1 4/9] bpf, x86: Convert struct_ops arena arguments in the trampoline Kumar Kartikeya Dwivedi
2026-07-15 22:00 ` [PATCH bpf-next v1 5/9] selftests/bpf: Add kfunc __arena and __arena_nullable argument tests Kumar Kartikeya Dwivedi
2026-07-15 22:00 ` [PATCH bpf-next v1 6/9] selftests/bpf: Add JIT-sequence tests for __arena kfunc arguments Kumar Kartikeya Dwivedi
2026-07-15 22:00 ` [PATCH bpf-next v1 7/9] selftests/bpf: Add struct_ops __arena and __arena_nullable argument tests Kumar Kartikeya Dwivedi
2026-07-15 22:00 ` [PATCH bpf-next v1 8/9] bpf, x86: Fix stack-passed arguments for indirect trampolines Kumar Kartikeya Dwivedi
2026-07-15 22:14 ` sashiko-bot
2026-07-16 11:32 ` Kumar Kartikeya Dwivedi
2026-07-15 22:51 ` bot+bpf-ci
2026-07-15 22:00 ` [PATCH bpf-next v1 9/9] selftests/bpf: Test stack-passed struct_ops arena arguments Kumar Kartikeya Dwivedi
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=20260715220052.1590783-1-memxor@gmail.com \
--to=memxor@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=kernel-team@meta.com \
--cc=kkd@meta.com \
--cc=tj@kernel.org \
/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