Skip to content

bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics

Yonghong Song netdev 3 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v23 patches 3 repliesSuperseded
  3. v13 patches 2 repliesSuperseded

Changes in v3 from the cover letter

Fix comments to make patchwork happy

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semanticskernel/bpf/verifier.c+24 -160 replies
2/3bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZEROkernel/trace/bpf_trace.c+6 -20 replies
3/3bpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics changetools/testing/selftests/bpf/test_verifier.c+112 -190 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAlexei StarovoitovDaniel Borkmann
1/3A-b A-b
2/3A-b A-b
3/3A-b A-b

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 net-next 0/3 v3] bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics

This patch set intends to change verifier ARG_CONST_SIZE_OR_ZERO semantics so that simpler bpf programs can be written with verifier acceptance. Patch #1 comment provided the detailed examples and the patch itself implements the new semantics. Patch #2 changes bpf_probe_read helper arg2 type from ARG_CONST_SIZE to ARG_CONST_SIZE_OR_ZERO. Patch #3 fixed a few test cases and added some for better coverage.

Changelog:
v2 -> v3:
Fix comments to make patchwork happy
v1 -> v2:
Fix typo in commit message pointed by Sergei Shtylyov

Yonghong Song (3):
bpf: improve verifier ARG_CONST_SIZE_OR_ZERO semantics
bpf: change helper bpf_probe_read arg2 type to ARG_CONST_SIZE_OR_ZERO
bpf: fix and add test cases for ARG_CONST_SIZE_OR_ZERO semantics
change

 kernel/bpf/verifier.c                       |  40 +++++----
 kernel/trace/bpf_trace.c                    |   8 +-
 tools/testing/selftests/bpf/test_verifier.c | 131 ++++++++++++++++++++++++----
 3 files changed, 142 insertions(+), 37 deletions(-)
Signature · 1 line
2.9.5