public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 00/10] Teach libbpf to "fix up" BPF verifier log
@ 2022-04-26  0:45 Andrii Nakryiko
  2022-04-26  0:45 ` [PATCH bpf-next 01/10] libbpf: fix anonymous type check in CO-RE logic Andrii Nakryiko
                   ` (10 more replies)
  0 siblings, 11 replies; 16+ messages in thread
From: Andrii Nakryiko @ 2022-04-26  0:45 UTC (permalink / raw)
  To: bpf, ast, daniel; +Cc: andrii, kernel-team

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

-- 
2.30.2


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-04-26 22:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-26  0:45 [PATCH bpf-next 00/10] Teach libbpf to "fix up" BPF verifier log Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 01/10] libbpf: fix anonymous type check in CO-RE logic Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 02/10] libbpf: drop unhelpful "program too large" guess Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 03/10] libbpf: fix logic for finding matching program for CO-RE relocation Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 04/10] libbpf: avoid joining .BTF.ext data with BPF programs by section name Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 05/10] selftests/bpf: add CO-RE relos and SEC("?...") to linked_funcs selftests Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 06/10] libbpf: record subprog-resolved CO-RE relocations unconditionally Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 07/10] libbpf: refactor CO-RE relo human description formatting routine Andrii Nakryiko
2022-04-26 18:52   ` Alexei Starovoitov
2022-04-26 22:20     ` Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 08/10] libbpf: simplify bpf_core_parse_spec() signature Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 09/10] libbpf: fix up verifier log for unguarded failed CO-RE relos Andrii Nakryiko
2022-04-26 18:59   ` Alexei Starovoitov
2022-04-26 22:16     ` Andrii Nakryiko
2022-04-26  0:45 ` [PATCH bpf-next 10/10] selftests/bpf: add libbpf's log fixup logic selftests Andrii Nakryiko
2022-04-26 22:50 ` [PATCH bpf-next 00/10] Teach libbpf to "fix up" BPF verifier log patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox