Skip to content

fix BTF verification size resolution

Andrii Nakryiko bpf netdev 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesApplied
  2. v23 patches 8 repliesSuperseded
  3. v11 patch 8 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3bpf: fix BTF verifier size resolution logickernel/bpf/btf.c+12 -71 reply
2/3selftests/bpf: add trickier size resolution teststools/testing/selftests/bpf/test_btf.c+88 -00 replies
3/3selftests/bpf: use typedef'ed arrays as map valuestools/testing/selftests/bpf/progs/test_get_stack_rawtp.c tools/testing/selftests/bpf/progs/test_stacktrace_build_id.c tools/testing/selftests/bpf/progs/test_stacktrace_map.c+4 -40 replies

Reviews trailers per patch

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

PatchYonghong SongMartin KaFai Lau
SeriesA-b
1/3A-b
2/3
3/3

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

Read the v3 thread

Cover letter [PATCH v3 bpf 0/3] fix BTF verification size resolution

BTF size resolution logic isn't always resolving type size correctly, leading to erroneous map creation failures due to value size mismatch.

This patch set:
1. fixes the issue (patch #1);
2. adds tests for trickier cases (patch #2);
3. and converts few test cases utilizing BTF-defined maps, that previously couldn't use typedef'ed arrays due to kernel bug (patch #3).

Andrii Nakryiko (3):
bpf: fix BTF verifier size resolution logic selftests/bpf: add trickier size resolution tests selftests/bpf: use typedef'ed arrays as map values

 kernel/bpf/btf.c                              | 19 ++--
 .../bpf/progs/test_get_stack_rawtp.c          |  3 +-
 .../bpf/progs/test_stacktrace_build_id.c      |  3 +-
 .../selftests/bpf/progs/test_stacktrace_map.c |  2 +-
 tools/testing/selftests/bpf/test_btf.c        | 88 +++++++++++++++++++
 5 files changed, 104 insertions(+), 11 deletions(-)
Signature · 1 line
2.17.1