BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/7] bpf: Follow-up fixes for stack argument support
@ 2026-05-15 22:50 Yonghong Song
  2026-05-15 22:50 ` [PATCH bpf-next v3 1/7] bpf: Validate outgoing stack args when btf_prepare_func_args fails Yonghong Song
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Yonghong Song @ 2026-05-15 22:50 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann, kernel-team,
	Martin KaFai Lau

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


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

end of thread, other threads:[~2026-05-16  3:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 22:50 [PATCH bpf-next v3 0/7] bpf: Follow-up fixes for stack argument support Yonghong Song
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-16  3:51   ` Kumar Kartikeya Dwivedi
2026-05-15 22:51 ` [PATCH bpf-next v3 7/7] selftests/bpf: Add exception tests with " Yonghong Song
2026-05-16  3:53   ` Kumar Kartikeya Dwivedi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox