bpf: keep track of verifier insn_processed
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
- v3 Latest2 patches 0 repliesApplied 2/2
- v22 patches 4 repliesSuperseded
- v12 patches 2 repliesSuperseded
Changes in v3 from the cover letter
* Remove unnecessary check in patch 2's test [Andrii]
* Go back to adding new u32 in bpf_prog_info (vs using spare bits) [Andrii]
* Rebase + add acks [Andrii, John]
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf: add verified_insns to bpf_prog_info and fdinfoinclude/ include/ kernel/ +2 more | +10 | 0 replies | Applied |
| 2/2 | selftests/bpf: add verif_stats testtools/ | +28 | 0 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | John Fastabend | Andrii Nakryiko |
|---|---|---|
| 1/2 | A-b | |
| 2/2 | A-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 bpf-next 0/2] bpf: keep track of verifier insn_processed
This is a followup to discussion around RFC patchset "bpf: keep track of prog verification stats" [0]. The RFC elaborates on my usecase, but to
summarize: keeping track of verifier stats for programs as they - and the kernels they run on - change over time can help developers of individual programs and BPF kernel folks.
The RFC added a verif_stats to the uapi which contained most of the info which verifier prints currently. Feedback here was to avoid polluting uapi with stats that might be meaningless after major changes to the verifier, but that insn_processed or conceptually similar number would exist in the long term and was safe to expose.
So let's expose just insn_processed via bpf_prog_info and fdinfo for now and explore good ways of getting more complicated stats in the future.
[0] https://lore.kernel.org/bpf/[email protected]/
v2->v3:
* Remove unnecessary check in patch 2's test [Andrii]
* Go back to adding new u32 in bpf_prog_info (vs using spare bits) [Andrii]
* Rebase + add acks [Andrii, John]
v1->v2:
* Rename uapi field from insn_processed to verified_insns [Daniel]
* use 31 bits of existing bitfield space in bpf_prog_info [Daniel]
* change underlying type from 64-> 32 bits [Daniel]
Dave Marchevsky (2):
bpf: add verified_insns to bpf_prog_info and fdinfo selftests/bpf: add verif_stats test
include/linux/bpf.h | 1 + include/uapi/linux/bpf.h | 1 + kernel/bpf/syscall.c | 8 ++++-- kernel/bpf/verifier.c | 1 + tools/include/uapi/linux/bpf.h | 1 + .../selftests/bpf/prog_tests/verif_stats.c | 28 +++++++++++++++++++ 6 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/verif_stats.c
Signature · 1 line
2.30.2