From: Yonghong Song <yonghong.song@linux.dev>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
kernel-team@fb.com, Martin KaFai Lau <martin.lau@kernel.org>
Subject: [PATCH bpf-next v3 0/7] bpf: Follow-up fixes for stack argument support
Date: Fri, 15 May 2026 15:50:35 -0700 [thread overview]
Message-ID: <20260515225035.821178-1-yonghong.song@linux.dev> (raw)
Commit cd59fa185a03 ("bpf: Support stack arguments for BPF functions and kfuncs")
added stack argument support for bpf functions and kfuncs. This patch set
is to fix various issues related to stack arguments, mainly include:
- Validate outgoing stack args when btf_prepare_func_args fails
- Fix arg_track_join log to use sa prefix for stack arg slots
- Clean up redundant stack arg checks for non-JITed programs
- Fix exception unwinding with outgoing stack arguments
Changelog:
v2 -> v3:
- v2: https://lore.kernel.org/bpf/20260515014958.1186132-1-yonghong.song@linux.dev/
- Add additional fix (fix arg_track_join log, fix exception with outgoing stack
arguments, some cleanup, etc.).
v1 -> v2:
- v1: https://lore.kernel.org/bpf/20260514184827.1619863-1-yonghong.song@linux.dev/
- Remove 'Reported-by: Sashiko <sashiko-bot@kernel.org>'.
- Add proper fix tag.
Yonghong Song (7):
bpf: Validate outgoing stack args when btf_prepare_func_args fails
selftests/bpf: Add test for stack arg read without caller write
selftests/bpf: Log arg_track_join for stack arg slots in liveness
analysis
bpf: Fix arg_track_join log to use sa prefix for stack arg slots
bpf: Clean up redundant stack arg checks for non-JITed programs
bpf,x86: Fix exception unwinding with outgoing stack arguments
selftests/bpf: Add exception tests with stack arguments
arch/x86/net/bpf_jit_comp.c | 9 +-
include/linux/bpf.h | 3 +-
kernel/bpf/core.c | 2 +-
kernel/bpf/fixups.c | 3 +-
kernel/bpf/helpers.c | 2 +-
kernel/bpf/liveness.c | 4 +-
kernel/bpf/verifier.c | 10 +-
.../selftests/bpf/prog_tests/exceptions.c | 7 ++
.../bpf/progs/btf__verifier_stack_arg_order.c | 8 ++
.../testing/selftests/bpf/progs/exceptions.c | 113 ++++++++++++++++++
.../selftests/bpf/progs/verifier_stack_arg.c | 8 +-
.../bpf/progs/verifier_stack_arg_order.c | 58 +++++++++
12 files changed, 216 insertions(+), 11 deletions(-)
--
2.53.0-Meta
next reply other threads:[~2026-05-15 22:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 22:50 Yonghong Song [this message]
2026-05-15 22:50 ` [PATCH bpf-next v3 1/7] bpf: Validate outgoing stack args when btf_prepare_func_args fails Yonghong Song
2026-05-15 22:50 ` [PATCH bpf-next v3 2/7] selftests/bpf: Add test for stack arg read without caller write Yonghong Song
2026-05-15 22:50 ` [PATCH bpf-next v3 3/7] selftests/bpf: Log arg_track_join for stack arg slots in liveness analysis Yonghong Song
2026-05-15 22:50 ` [PATCH bpf-next v3 4/7] bpf: Fix arg_track_join log to use sa prefix for stack arg slots Yonghong Song
2026-05-15 22:51 ` [PATCH bpf-next v3 5/7] bpf: Clean up redundant stack arg checks for non-JITed programs Yonghong Song
2026-05-15 22:51 ` [PATCH bpf-next v3 6/7] bpf,x86: Fix exception unwinding with outgoing stack arguments Yonghong Song
2026-05-15 22:51 ` [PATCH bpf-next v3 7/7] selftests/bpf: Add exception tests with " Yonghong Song
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=20260515225035.821178-1-yonghong.song@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=martin.lau@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.