Teach libbpf to "fix up" BPF verifier log
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
Patches in v1 All 10 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | libbpf: fix anonymous type check in CO-RE logictools/ | +1 | 0 replies | Applied |
| 2/10 | libbpf: drop unhelpful "program too large" guesstools/ | +0 | 0 replies | Applied |
| 3/10 | libbpf: fix logic for finding matching program for CO-RE relocationtools/ | +3 | 0 replies | Applied |
| 4/10 | libbpf: avoid joining .BTF.ext data with BPF programs by section nametools/ tools/ tools/ | +65 | 0 replies | Applied |
| 5/10 | selftests/bpf: add CO-RE relos and SEC("?...") to linked_funcs selfteststools/ tools/ tools/ | +18 | 0 replies | Applied |
| 6/10 | libbpf: record subprog-resolved CO-RE relocations unconditionallytools/ | +12 | 0 replies | Applied |
| 7/10 | libbpf: refactor CO-RE relo human description formatting routinetools/ | +38 | 2 replies | Applied |
| 8/10 | libbpf: simplify bpf_core_parse_spec() signaturetools/ | +15 | 0 replies | Applied |
| 9/10 | libbpf: fix up verifier log for unguarded failed CO-RE relostools/ tools/ tools/ | +154 | 2 replies | Applied |
| 10/10 | selftests/bpf: add libbpf's log fixup logic selfteststools/ tools/ tools/ | +163 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH bpf-next 00/10] Teach libbpf to "fix up" BPF verifier log
This patch set teaches libbpf to enhance BPF verifier log with human-readable and relevant information about failed CO-RE relocation. Patch #9 is the main one with the new logic. See relevant commit messages for some more details.
All the other patches are either fixing various bugs detected while working on this feature, most prominently a bug with libbpf not handling CO-RE relocations for SEC("?...") programs, or are refactoring libbpf internals to allow for easier reuse of CO-RE relo lookup and formatting logic.
Andrii Nakryiko (10):
libbpf: fix anonymous type check in CO-RE logic
libbpf: drop unhelpful "program too large" guess
libbpf: fix logic for finding matching program for CO-RE relocation
libbpf: avoid joining .BTF.ext data with BPF programs by section name selftests/bpf: add CO-RE relos and SEC("?...") to linked_funcs
selftests
libbpf: record subprog-resolved CO-RE relocations unconditionally
libbpf: refactor CO-RE relo human description formatting routine
libbpf: simplify bpf_core_parse_spec() signature
libbpf: fix up verifier log for unguarded failed CO-RE relos selftests/bpf: add libbpf's log fixup logic selftests
tools/lib/bpf/btf.c | 9 +- tools/lib/bpf/libbpf.c | 252 ++++++++++++++---- tools/lib/bpf/libbpf_internal.h | 7 + tools/lib/bpf/relo_core.c | 104 ++++---- tools/lib/bpf/relo_core.h | 6 + .../selftests/bpf/prog_tests/linked_funcs.c | 6 + .../selftests/bpf/prog_tests/log_fixup.c | 114 ++++++++ .../selftests/bpf/progs/linked_funcs1.c | 7 +- .../selftests/bpf/progs/linked_funcs2.c | 7 +- .../selftests/bpf/progs/test_log_fixup.c | 38 +++ tools/testing/selftests/bpf/test_progs.h | 11 + 11 files changed, 464 insertions(+), 97 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/log_fixup.c create mode 100644 tools/testing/selftests/bpf/progs/test_log_fixup.c
Signature · 1 line
2.30.2