Skip to content

BPF array map fixes and improvements

Andrii Nakryiko bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyApplied 4/4
  2. v14 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- fix broken patch #1 (no mask_index use in helper, as stated in commit message; and add missing semicolon).

Patches in v2 All 4 applied

#Subject and filesSizeRepliesApplied
1/4bpf: fix potential 32-bit overflow when accessing ARRAY map elementkernel/bpf/arraymap.c+12 -80 repliesApplied
2/4bpf: make uniform use of array->elem_size everywhere in arraymap.ckernel/bpf/arraymap.c+8 -60 repliesApplied
3/4bpf: remove obsolete KMALLOC_MAX_SIZE restriction on array map value sizekernel/bpf/arraymap.c+2 -40 repliesApplied
4/4selftests/bpf: validate .bss section bigger than 8MB is possible nowtools/testing/selftests/bpf/prog_tests/skeleton.c tools/testing/selftests/bpf/progs/test_skeleton.c+6 -00 repliesApplied

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchYonghong Song
SeriesA-b
1/4
2/4
3/4
4/4

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 v2 bpf-next 0/4] BPF array map fixes and improvements

Fix 32-bit overflow in value pointer calculations in BPF array map. And then raise obsolete limit on array map value size. Add selftest making sure this is working as intended.

v1->v2:
- fix broken patch #1 (no mask_index use in helper, as stated in commit message; and add missing semicolon).

Andrii Nakryiko (4):
bpf: fix potential 32-bit overflow when accessing ARRAY map element
bpf: make uniform use of array->elem_size everywhere in arraymap.c
bpf: remove obsolete KMALLOC_MAX_SIZE restriction on array map value
size
selftests/bpf: validate .bss section bigger than 8MB is possible now

 kernel/bpf/arraymap.c                         | 40 ++++++++++---------
 .../selftests/bpf/prog_tests/skeleton.c       |  2 +
 .../selftests/bpf/progs/test_skeleton.c       |  4 ++
 3 files changed, 28 insertions(+), 18 deletions(-)
Signature · 1 line
2.30.2