Skip to content

Verify global subprogs lazily

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 Latest3 patches 0 repliesApplied 3/3
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- rebases on latest bpf-next resolving conflicts with bpf_loop fixes;
- added acks from Eduard and Daniel.

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: emit global subprog name in verifier logskernel/bpf/verifier.c+24 -110 repliesApplied
2/3bpf: validate global subprogs lazilyinclude/linux/bpf.h kernel/bpf/verifier.c tools/testing/selftests/bpf/progs/test_global_func12.c +1 more+48 -100 repliesApplied
3/3selftests/bpf: add lazy global subprog validation teststools/testing/selftests/bpf/prog_tests/verifier.c tools/testing/selftests/bpf/progs/verifier_global_subprogs.c+94 -00 repliesApplied

Reviews trailers per patch

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

PatchEduard ZingermanDaniel 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 v2 thread

Cover letter [PATCH v2 bpf-next 0/3] Verify global subprogs lazily

See patch #2 for justification. In few words, current eager verification of global func prevents BPF CO-RE approaches to be applied to global functions.

Patch #1 is just a nicety to emit global subprog names in verifier logs.

Patch #3 adds selftests validating new lazy semantics.

v1->v2:
- rebases on latest bpf-next resolving conflicts with bpf_loop fixes;
- added acks from Eduard and Daniel.

Andrii Nakryiko (3):
bpf: emit global subprog name in verifier logs
bpf: validate global subprogs lazily selftests/bpf: add lazy global subprog validation tests

 include/linux/bpf.h                           |  2 +
 kernel/bpf/verifier.c                         | 83 +++++++++++++----
 .../selftests/bpf/prog_tests/verifier.c       |  2 +
 .../selftests/bpf/progs/test_global_func12.c  |  4 +-
 .../bpf/progs/verifier_global_subprogs.c      | 92 +++++++++++++++++++
 .../bpf/progs/verifier_subprog_precision.c    |  4 +-
 6 files changed, 166 insertions(+), 21 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/verifier_global_subprogs.c
Signature · 1 line
2.34.1