BPF List
 help / color / mirror / Atom feed
* [PATCH bpf 00/27] bpf: Fixes for the verifier, arena, skb and lwt helpers
@ 2026-11-01 19:05 Alexei Starovoitov
  2026-11-01 19:05 ` [PATCH bpf 01/27] bpf: Clamp the trace length in __bpf_get_stack() again Alexei Starovoitov
                   ` (27 more replies)
  0 siblings, 28 replies; 38+ messages in thread
From: Alexei Starovoitov @ 2026-11-01 19:05 UTC (permalink / raw)
  To: bpf; +Cc: daniel, andrii, eddyz87, memxor, josef, mason

From: Alexei Starovoitov <ast@kernel.org>

These patches fix bugs in BPF:

  patches  area
  -------  ----------------------------------------------------------------
  01-02    stack traces: the limit of the trace length
  03-07    arena: the range of mmap() and of bpf_arena_free_pages()
  08-12    arguments of kfuncs and of extension progs
  13       cgroup detach: the permission check
  14       cgroup skb progs: the network offset
  15       bpf_skb_adjust_room(): the limit of gso_size
  16-24    lwt and seg6local End.BPF progs: pushed headers, skb->cb, dst
  25-27    skb offsets when a helper adds or removes room

10 of the patches are from Chris Mason and Josef Bacik. Patches 07 and 12
are selftests.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Alexei Starovoitov (17):
  bpf: Clamp the trace length before the skip test in stackid_init()
  bpf: Refuse to map an arena at address 0
  bpf: Don't let bpf_arena_free_pages() see a half-set user range
  bpf: Refuse an arena mmap() longer than max_entries pages
  bpf: Remove the WARN from arena_get_unmapped_area()
  selftests/bpf: Test the length and the address of an arena mmap()
  bpf: Don't turn struct arguments of KF_ACQUIRE kfuncs into memory
  bpf: Don't turn kfunc arguments of an empty struct type into memory
  bpf: Compare the arguments of an extension with those of its target
  selftests/bpf: Test the arguments of an extension prog
  bpf: Don't let bpf_skb_adjust_room() raise gso_size to GSO_BY_FRAGS
  bpf: Set a dst for test runs of lwt_in progs
  bpf: Don't look for the SRH again in the End.BPF helpers
  bpf: Don't leave a stale MAC header in bpf_lwt_push_ip_encap()
  bpf: Reset skb->cb after an lwt prog pushes an IP header
  bpf: Require BPF_LWT_REROUTE when an lwt_in prog changes the protocol
  bpf: Don't let lwt_in progs call into IPv6 when it is disabled

Chris Mason (9):
  bpf: Reject memory for kfunc projection type args
  bpf: Require prog fd or capability for cgroup detach
  bpf, cgroup: Keep the skb network offset signed
  bpf: Reject non-IPv6 packets in BPF_LWT_ENCAP_SEG6
  bpf: Limit the SRH length in bpf_lwt_seg6_adjust_srh()
  bpf: Move the MAC header in bpf_lwt_seg6_adjust_srh()
  bpf: Move the transport header with the moved headers
  bpf: Use the inner transport header after a decap
  bpf: Check the offset in bpf_skb_generic_{push,pop}()

Josef Bacik (1):
  bpf: Clamp the trace length in __bpf_get_stack() again

 Documentation/bpf/kfuncs.rst                  |   7 +
 include/linux/bpf.h                           |  10 ++
 include/linux/bpf_verifier.h                  |   8 --
 include/linux/btf.h                           |   1 +
 kernel/bpf/arena.c                            |  16 ++-
 kernel/bpf/btf.c                              |  19 ++-
 kernel/bpf/cgroup.c                           |  26 +++-
 kernel/bpf/stackmap.c                         |  33 +++--
 kernel/bpf/verifier.c                         |  66 ++++++++-
 net/bpf/test_run.c                            |   3 +-
 net/core/filter.c                             | 133 ++++++++++++++----
 net/core/lwt_bpf.c                            |  53 ++++++-
 .../selftests/bpf/prog_tests/arena_mmap.c     |  37 +++++
 .../selftests/bpf/prog_tests/freplace_args.c  |  92 ++++++++++++
 .../selftests/bpf/progs/freplace_args.c       |  53 +++++++
 .../selftests/bpf/progs/freplace_args_tgt.c   |  70 +++++++++
 16 files changed, 564 insertions(+), 63 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/arena_mmap.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/freplace_args.c
 create mode 100644 tools/testing/selftests/bpf/progs/freplace_args.c
 create mode 100644 tools/testing/selftests/bpf/progs/freplace_args_tgt.c


base-commit: 5b96632457e4ccae88ecb751cf48176b2e3629a7
-- 
2.55.0


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

end of thread, other threads:[~2026-11-02  0:20 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-01 19:05 [PATCH bpf 00/27] bpf: Fixes for the verifier, arena, skb and lwt helpers Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 01/27] bpf: Clamp the trace length in __bpf_get_stack() again Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 02/27] bpf: Clamp the trace length before the skip test in stackid_init() Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 03/27] bpf: Refuse to map an arena at address 0 Alexei Starovoitov
2026-11-01 19:19   ` sashiko-bot
2026-11-01 19:05 ` [PATCH bpf 04/27] bpf: Don't let bpf_arena_free_pages() see a half-set user range Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 05/27] bpf: Refuse an arena mmap() longer than max_entries pages Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 06/27] bpf: Remove the WARN from arena_get_unmapped_area() Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 07/27] selftests/bpf: Test the length and the address of an arena mmap() Alexei Starovoitov
2026-11-01 19:38   ` bot+bpf-ci
2026-11-01 19:05 ` [PATCH bpf 08/27] bpf: Reject memory for kfunc projection type args Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 09/27] bpf: Don't turn struct arguments of KF_ACQUIRE kfuncs into memory Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 10/27] bpf: Don't turn kfunc arguments of an empty struct type " Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 11/27] bpf: Compare the arguments of an extension with those of its target Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 12/27] selftests/bpf: Test the arguments of an extension prog Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 13/27] bpf: Require prog fd or capability for cgroup detach Alexei Starovoitov
2026-11-01 19:38   ` bot+bpf-ci
2026-11-02  0:12     ` Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 14/27] bpf, cgroup: Keep the skb network offset signed Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 15/27] bpf: Don't let bpf_skb_adjust_room() raise gso_size to GSO_BY_FRAGS Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 16/27] bpf: Reject non-IPv6 packets in BPF_LWT_ENCAP_SEG6 Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 17/27] bpf: Set a dst for test runs of lwt_in progs Alexei Starovoitov
2026-11-01 19:38   ` bot+bpf-ci
2026-11-02  0:12     ` Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 18/27] bpf: Limit the SRH length in bpf_lwt_seg6_adjust_srh() Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 19/27] bpf: Don't look for the SRH again in the End.BPF helpers Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 20/27] bpf: Move the MAC header in bpf_lwt_seg6_adjust_srh() Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 21/27] bpf: Don't leave a stale MAC header in bpf_lwt_push_ip_encap() Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 22/27] bpf: Reset skb->cb after an lwt prog pushes an IP header Alexei Starovoitov
2026-11-01 19:51   ` sashiko-bot
2026-11-01 19:05 ` [PATCH bpf 23/27] bpf: Require BPF_LWT_REROUTE when an lwt_in prog changes the protocol Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 24/27] bpf: Don't let lwt_in progs call into IPv6 when it is disabled Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 25/27] bpf: Move the transport header with the moved headers Alexei Starovoitov
2026-11-01 19:05 ` [PATCH bpf 26/27] bpf: Use the inner transport header after a decap Alexei Starovoitov
2026-11-01 19:57   ` sashiko-bot
2026-11-01 19:05 ` [PATCH bpf 27/27] bpf: Check the offset in bpf_skb_generic_{push,pop}() Alexei Starovoitov
2026-11-01 20:00   ` sashiko-bot
2026-11-02  0:20 ` [PATCH bpf 00/27] bpf: Fixes for the verifier, arena, skb and lwt helpers patchwork-bot+netdevbpf

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