Skip to content

skb/arena bugfixes

Emil Tsalapatis bpf netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 8 repliesIn review 8 of 11 applied
  2. v111 patches 8 repliesSuperseded

Patches in v2 8 of 11 applied

#Subject and filesSizeRepliesApplied
1/11bpf: Fix bounds check for skb-backed dynptrsinclude/linux/skbuff.h+4 -11 replyApplied
2/11selftests/bpf: Test dynptr slices past end of skbtools/testing/selftests/bpf/prog_tests/dynptr.c tools/testing/selftests/bpf/progs/dynptr_success.c+30 -01 replyApplied
3/11bpf: Fix bpf_sock context code generationnet/core/filter.c+4 -30 repliesApplied
4/11selftests/bpf: Add selftests for rx_queue_mapping context accesstools/testing/selftests/bpf/progs/verifier_sock.c+38 -00 repliesApplied
5/11bpf: Reject pkt arguments in mutating subprogskernel/bpf/verifier.c+10 -01 replyApplied
6/11selftests/bpf: Test rejection of pkt args to mutating subprogstools/testing/selftests/bpf/progs/verifier_global_ptr_args.c+53 -00 repliesApplied
7/11bpf: Prevent variable arena/non-arena register contentsinclude/linux/bpf_verifier.h kernel/bpf/verifier.c+24 -10 repliesApplied
8/11selftests/bpf: Test for mixed arena/nonarena code pathstools/testing/selftests/bpf/progs/verifier_arena.c+49 -00 repliesApplied
9/11bpf: Track whether dynptr type is knowninclude/linux/bpf_verifier.h kernel/bpf/states.c kernel/bpf/verifier.c+21 -93 replies
10/11bpf: Track skb memory invalidation by packet-backed dynptrsinclude/linux/bpf_verifier.h kernel/bpf/cfg.c kernel/bpf/verifier.c+59 -42 replies
11/11selftests/bpf: Test dynptr slice invalidation on skb clobbertools/testing/selftests/bpf/progs/dynptr_fail.c+183 -00 replies

Reviews trailers per patch

4 of 11 patches have a Reviewed-by or Acked-by.

PatchJiayuan ChenAmery Hung
1/11R-b R-b
2/11R-b
3/11R-b
4/11
5/11R-b
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH bpf v2 00/11] skb/arena bugfixes

Set of verifier-focused bugfixes related to dynptrs, SKB management in BPF, and dynptrs.

v1 -> v2 (https://lore.kernel.org/bpf/[email protected]/)

- (01/11) Adjust typecasting to just be unsigned int (Jakub)
- (09/11) Test for the new field in stacksafe when comparing registers (bot-ci)
- (01/11, 03/11) Added Reviewed-by by Jiayuan

Emil Tsalapatis (11):
bpf: Fix bounds check for skb-backed dynptrs selftests/bpf: Test dynptr slices past end of skb
bpf: Fix bpf_sock context code generation selftests/bpf: Add selftests for rx_queue_mapping context access
bpf: Reject pkt arguments in mutating subprogs selftests/bpf: Test rejection of pkt args to mutating subprogs
bpf: Prevent variable arena/non-arena register contents selftests/bpf: Test for mixed arena/nonarena code paths
bpf: Track whether dynptr type is known
bpf: Track skb memory invalidation by packet-backed dynptrs selftests/bpf: Test dynptr slice invalidation on skb clobber

 include/linux/bpf_verifier.h                  |   5 +
 include/linux/skbuff.h                        |   5 +-
 kernel/bpf/cfg.c                              |  10 +-
 kernel/bpf/states.c                           |   1 +
 kernel/bpf/verifier.c                         | 112 +++++++++--
 net/core/filter.c                             |   7 +-
 .../testing/selftests/bpf/prog_tests/dynptr.c |  10 +
 .../testing/selftests/bpf/progs/dynptr_fail.c | 183 ++++++++++++++++++
 .../selftests/bpf/progs/dynptr_success.c      |  20 ++
 .../selftests/bpf/progs/verifier_arena.c      |  49 +++++
 .../bpf/progs/verifier_global_ptr_args.c      |  53 +++++
 .../selftests/bpf/progs/verifier_sock.c       |  38 ++++
 12 files changed, 475 insertions(+), 18 deletions(-)
Signature · 1 line
2.54.0