]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Make BTF finalization strict
authorAndrii Nakryiko <andriin@fb.com>
Wed, 8 Jul 2020 01:53:13 +0000 (18:53 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 8 Jul 2020 22:44:44 +0000 (00:44 +0200)
commitde88ac516731e2bf694e2db37dd77e2d1d56bad7
tree368722cb251a4c8c744be6006b2a650e6938af72
parent759b866e3aa19c94f314697e361bef538ceb536d
libbpf: Make BTF finalization strict

With valid ELF and valid BTF, there is no reason (apart from bugs) why BTF
finalization should fail. So make it strict and return error if it fails. This
makes CO-RE relocation more reliable, as they are not going to be just
silently skipped, if BTF finalization failed.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200708015318.3827358-2-andriin@fb.com
tools/lib/bpf/libbpf.c