#
44382b3e |
| 14-May-2024 |
Friedrich Vock <friedrich.vock@gmx.de> |
bpf: Fix potential integer overflow in resolve_btfids
err is a 32-bit integer, but elf_update returns an off_t, which is 64-bit at least on 64-bit platforms. If symbols_patch is called on a binary b
bpf: Fix potential integer overflow in resolve_btfids
err is a 32-bit integer, but elf_update returns an off_t, which is 64-bit at least on 64-bit platforms. If symbols_patch is called on a binary between 2-4GB in size, the result will be negative when cast to a 32-bit integer, which the code assumes means an error occurred. This can wrongly trigger build failures when building very large kernel images.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20240514070931.199694-1-friedrich.vock@gmx.de
show more ...
|
#
903fad43 |
| 06-Feb-2024 |
Viktor Malik <vmalik@redhat.com> |
tools/resolve_btfids: Fix cross-compilation to non-host endianness
The .BTF_ids section is pre-filled with zeroed BTF ID entries during the build and afterwards patched by resolve_btfids with correc
tools/resolve_btfids: Fix cross-compilation to non-host endianness
The .BTF_ids section is pre-filled with zeroed BTF ID entries during the build and afterwards patched by resolve_btfids with correct values. Since resolve_btfids always writes in host-native endianness, it relies on libelf to do the translation when the target ELF is cross-compiled to a different endianness (this was introduced in commit 61e8aeda9398 ("bpf: Fix libelf endian handling in resolv_btfids")).
Unfortunately, the translation will corrupt the flags fields of SET8 entries because these were written during vmlinux compilation and are in the correct endianness already. This will lead to numerous selftests failures such as:
$ sudo ./test_verifier 502 502 #502/p sleepable fentry accept FAIL Failed to load prog 'Invalid argument'! bpf_fentry_test1 is not sleepable verification time 34 usec stack depth 0 processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 Summary: 0 PASSED, 0 SKIPPED, 1 FAILED
Since it's not possible to instruct libelf to translate just certain values, let's manually bswap the flags (both global and entry flags) in resolve_btfids when needed, so that libelf then translates everything correctly.
Fixes: ef2c6f370a63 ("tools/resolve_btfids: Add support for 8-byte BTF sets") Signed-off-by: Viktor Malik <vmalik@redhat.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/7b6bff690919555574ce0f13d2a5996cacf7bf69.1707223196.git.vmalik@redhat.com
show more ...
|
#
9707ac4f |
| 06-Feb-2024 |
Viktor Malik <vmalik@redhat.com> |
tools/resolve_btfids: Refactor set sorting with types from btf_ids.h
Instead of using magic offsets to access BTF ID set data, leverage types from btf_ids.h (btf_id_set and btf_id_set8) which define
tools/resolve_btfids: Refactor set sorting with types from btf_ids.h
Instead of using magic offsets to access BTF ID set data, leverage types from btf_ids.h (btf_id_set and btf_id_set8) which define the actual layout of the data. Thanks to this change, set sorting should also continue working if the layout changes.
This requires to sync the definition of 'struct btf_id_set8' from include/linux/btf_ids.h to tools/include/linux/btf_ids.h. We don't sync the rest of the file at the moment, b/c that would require to also sync multiple dependent headers and we don't need any other defs from btf_ids.h.
Signed-off-by: Viktor Malik <vmalik@redhat.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Daniel Xu <dxu@dxuuu.xyz> Link: https://lore.kernel.org/bpf/ff7f062ddf6a00815fda3087957c4ce667f50532.1707223196.git.vmalik@redhat.com
show more ...
|
#
70e79866 |
| 28-Feb-2023 |
Alexey Dobriyan <adobriyan@gmail.com> |
ELF: fix all "Elf" typos
ELF is acronym and therefore should be spelled in all caps.
I left one exception at Documentation/arm/nwfpe/nwfpe.rst which looks like being written in the first person.
L
ELF: fix all "Elf" typos
ELF is acronym and therefore should be spelled in all caps.
I left one exception at Documentation/arm/nwfpe/nwfpe.rst which looks like being written in the first person.
Link: https://lkml.kernel.org/r/Y/3wGWQviIOkyLJW@p183 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
show more ...
|
#
af03299d |
| 24-Jan-2023 |
Ian Rogers <irogers@google.com> |
tools/resolve_btfids: Install subcmd headers
Previously tools/lib/subcmd was added to the include path, switch to installing the headers and then including from that directory. This avoids dependenc
tools/resolve_btfids: Install subcmd headers
Previously tools/lib/subcmd was added to the include path, switch to installing the headers and then including from that directory. This avoids dependencies on headers internal to tools/lib/subcmd. Add the missing subcmd directory to the affected #include.
Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/bpf/20230124064324.672022-1-irogers@google.com
show more ...
|
#
ef2c6f37 |
| 21-Jul-2022 |
Kumar Kartikeya Dwivedi <memxor@gmail.com> |
tools/resolve_btfids: Add support for 8-byte BTF sets
A flag is a 4-byte symbol that may follow a BTF ID in a set8. This is used in the kernel to tag kfuncs in BTF sets with certain flags. Add suppo
tools/resolve_btfids: Add support for 8-byte BTF sets
A flag is a 4-byte symbol that may follow a BTF ID in a set8. This is used in the kernel to tag kfuncs in BTF sets with certain flags. Add support to adjust the sorting code so that it passes size as 8 bytes for 8-byte BTF sets.
Cc: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20220721134245.2450-3-memxor@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
show more ...
|
#
3345193f |
| 22-Nov-2021 |
Kumar Kartikeya Dwivedi <memxor@gmail.com> |
tools/resolve_btfids: Skip unresolved symbol warning for empty BTF sets
resolve_btfids prints a warning when it finds an unresolved symbol, (id == 0) in id_patch. This can be the case for BTF sets t
tools/resolve_btfids: Skip unresolved symbol warning for empty BTF sets
resolve_btfids prints a warning when it finds an unresolved symbol, (id == 0) in id_patch. This can be the case for BTF sets that are empty (due to disabled config options), hence printing warnings for certain builds, most recently seen in [0].
The reason behind this is because id->cnt aliases id->id in btf_id struct, leading to empty set showing up as ID 0 when we get to id_patch, which triggers the warning. Since sets are an exception here, accomodate by reusing hole in btf_id for bool is_set member, setting it to true for BTF set when setting id->cnt, and use that to skip extraneous warning.
[0]: https://lore.kernel.org/all/1b99ae14-abb4-d18f-cc6a-d7e523b25542@gmail.com
Before:
; ./tools/bpf/resolve_btfids/resolve_btfids -v -b vmlinux net/ipv4/tcp_cubic.ko adding symbol tcp_cubic_kfunc_ids WARN: resolve_btfids: unresolved symbol tcp_cubic_kfunc_ids patching addr 0: ID 0 [tcp_cubic_kfunc_ids] sorting addr 4: cnt 0 [tcp_cubic_kfunc_ids] update ok for net/ipv4/tcp_cubic.ko
After:
; ./tools/bpf/resolve_btfids/resolve_btfids -v -b vmlinux net/ipv4/tcp_cubic.ko adding symbol tcp_cubic_kfunc_ids patching addr 0: ID 0 [tcp_cubic_kfunc_ids] sorting addr 4: cnt 0 [tcp_cubic_kfunc_ids] update ok for net/ipv4/tcp_cubic.ko
Fixes: 0e32dfc80bae ("bpf: Enable TCP congestion control kfunc from modules") Reported-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20211122144742.477787-4-memxor@gmail.com
show more ...
|
#
1144ab9b |
| 24-Nov-2021 |
Andrii Nakryiko <andrii@kernel.org> |
tools/resolve_btf_ids: Close ELF file on error
Fix one case where we don't do explicit clean up.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by:
tools/resolve_btf_ids: Close ELF file on error
Fix one case where we don't do explicit clean up.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20211124002325.1737739-2-andrii@kernel.org
show more ...
|
#
2d8f09fa |
| 22-Oct-2021 |
Hengqi Chen <hengqi.chen@gmail.com> |
tools/resolve_btfids: Switch to new btf__type_cnt API
Replace the call to btf__get_nr_types with new API btf__type_cnt. The old API will be deprecated in libbpf v0.7+. No functionality change.
Sign
tools/resolve_btfids: Switch to new btf__type_cnt API
Replace the call to btf__get_nr_types with new API btf__type_cnt. The old API will be deprecated in libbpf v0.7+. No functionality change.
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211022130623.1548429-4-hengqi.chen@gmail.com
show more ...
|
#
1478994a |
| 07-Oct-2021 |
Quentin Monnet <quentin@isovalent.com> |
tools/resolve_btfids: Install libbpf headers when building
API headers from libbpf should not be accessed directly from the library's source directory. Instead, they should be exported with "make in
tools/resolve_btfids: Install libbpf headers when building
API headers from libbpf should not be accessed directly from the library's source directory. Instead, they should be exported with "make install_headers". Let's make sure that resolve_btfids installs the headers properly when building.
When descending from a parent Makefile, the specific output directories for building the library and exporting the headers are configurable with LIBBPF_OUT and LIBBPF_DESTDIR, respectively. This is in addition to OUTPUT, on top of which those variables are constructed by default.
Also adjust the Makefile for the BPF selftests in order to point to the (target) libbpf shared with other tools, instead of building a version specific to resolve_btfids. Remove libbpf's order-only dependencies on the include directories (they are created by libbpf and don't need to exist beforehand).
Signed-off-by: Quentin Monnet <quentin@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211007194438.34443-5-quentin@isovalent.com
show more ...
|
#
f614f2c7 |
| 02-Oct-2021 |
Kumar Kartikeya Dwivedi <memxor@gmail.com> |
tools: Allow specifying base BTF file in resolve_btfids
This commit allows specifying the base BTF for resolving btf id lists/sets during link time in the resolve_btfids tool. The base BTF is set to
tools: Allow specifying base BTF file in resolve_btfids
This commit allows specifying the base BTF for resolving btf id lists/sets during link time in the resolve_btfids tool. The base BTF is set to NULL if no path is passed. This allows resolving BTF ids for module kernel objects.
Also, drop the --no-fail option, as it is only used in case .BTF_ids section is not present, instead make no-fail the default mode. The long option name is same as that of pahole.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211002011757.311265-5-memxor@gmail.com
show more ...
|
#
5aad0368 |
| 27-Jul-2021 |
Hengqi Chen <hengqi.chen@gmail.com> |
tools/resolve_btfids: Emit warnings and patch zero id for missing symbols
Kernel functions referenced by .BTF_ids may be changed from global to static and get inlined or get renamed/removed, and thu
tools/resolve_btfids: Emit warnings and patch zero id for missing symbols
Kernel functions referenced by .BTF_ids may be changed from global to static and get inlined or get renamed/removed, and thus disappears from BTF. This causes kernel build failure when resolve_btfids do id patch for symbols in .BTF_ids in vmlinux. Update resolve_btfids to emit warning messages and patch zero id for missing symbols instead of aborting kernel build process.
Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20210727132532.2473636-2-hengqi.chen@gmail.com
show more ...
|
#
61e8aeda |
| 18-Jun-2021 |
Tony Ambardar <tony.ambardar@gmail.com> |
bpf: Fix libelf endian handling in resolv_btfids
The vmlinux ".BTF_ids" ELF section is declared in btf_ids.h to hold a list of zero-filled BTF IDs, which is then patched at link-time with correct va
bpf: Fix libelf endian handling in resolv_btfids
The vmlinux ".BTF_ids" ELF section is declared in btf_ids.h to hold a list of zero-filled BTF IDs, which is then patched at link-time with correct values by resolv_btfids. The section is flagged as "allocable" to preclude compression, but notably the section contents (BTF IDs) are untyped.
When patching the BTF IDs, resolve_btfids writes in host-native endianness and relies on libelf for any required translation on reading and updating vmlinux. However, since the type of the .BTF_ids section content defaults to ELF_T_BYTE (i.e. unsigned char), no translation occurs. This results in incorrect patched values when cross-compiling to non-native endianness, and can manifest as kernel Oops and test failures which are difficult to troubleshoot [1].
Explicitly set the type of patched data to ELF_T_WORD, the architecture- neutral ELF type corresponding to the u32 BTF IDs. This enables libelf to transparently perform any needed endian conversions.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Frank Eigler <fche@redhat.com> Cc: Mark Wielaard <mark@klomp.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/CAPGftE_eY-Zdi3wBcgDfkz_iOr1KF10n=9mJHm1_a_PykcsoeA@mail.gmail.com [1] Link: https://lore.kernel.org/bpf/20210618061404.818569-1-Tony.Ambardar@gmail.com
show more ...
|
#
e27bfefb |
| 29-Mar-2021 |
Stanislav Fomichev <sdf@google.com> |
tools/resolve_btfids: Fix warnings
* make eprintf static, used only in main.c * initialize ret in eprintf * remove unused *tmp
v3: * remove another err (Song Liu)
v2: * remove unused 'int err = -1
tools/resolve_btfids: Fix warnings
* make eprintf static, used only in main.c * initialize ret in eprintf * remove unused *tmp
v3: * remove another err (Song Liu)
v2: * remove unused 'int err = -1'
Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20210329223143.3659983-1-sdf@google.com
show more ...
|
#
41462c6e |
| 24-Feb-2021 |
Kun-Chuan Hsieh <jetswayss@gmail.com> |
tools/resolve_btfids: Fix build error with older host toolchains
Older libelf.h and glibc elf.h might not yet define the ELF compression types.
Checking and defining SHF_COMPRESSED fix the build er
tools/resolve_btfids: Fix build error with older host toolchains
Older libelf.h and glibc elf.h might not yet define the ELF compression types.
Checking and defining SHF_COMPRESSED fix the build error when compiling with older toolchains. Also, the tool resolve_btfids is compiled with host toolchain. The host toolchain is more likely to be older than the cross compile toolchain.
Fixes: 51f6463aacfb ("tools/resolve_btfids: Fix sections with wrong alignment") Signed-off-by: Kun-Chuan Hsieh <jetswayss@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/bpf/20210224052752.5284-1-jetswayss@gmail.com
show more ...
|
#
67208692 |
| 05-Jan-2021 |
Jiri Olsa <jolsa@kernel.org> |
tools/resolve_btfids: Warn when having multiple IDs for single type
The kernel image can contain multiple types (structs/unions) with the same name. This causes distinct type hierarchies in BTF data
tools/resolve_btfids: Warn when having multiple IDs for single type
The kernel image can contain multiple types (structs/unions) with the same name. This causes distinct type hierarchies in BTF data and makes resolve_btfids fail with error like:
BTFIDS vmlinux FAILED unresolved symbol udp6_sock
as reported by Qais Yousef [1].
This change adds warning when multiple types of the same name are detected:
BTFIDS vmlinux WARN: multiple IDs found for 'file': 526, 113351 - using 526 WARN: multiple IDs found for 'sk_buff': 2744, 113958 - using 2744
We keep the lower ID for the given type instance and let the build continue.
Also changing the 'nr' variable name to 'nr_types' to avoid confusion.
[1] https://lore.kernel.org/lkml/20201229151352.6hzmjvu3qh6p2qgg@e107158-lin/
Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210105234219.970039-1-jolsa@kernel.org
show more ...
|
#
22e8ebe3 |
| 03-Dec-2020 |
Brendan Jackman <jackmanb@google.com> |
tools/resolve_btfids: Fix some error messages
Add missing newlines and fix polarity of strerror argument.
Signed-off-by: Brendan Jackman <jackmanb@google.com> Signed-off-by: Alexei Starovoitov <ast
tools/resolve_btfids: Fix some error messages
Add missing newlines and fix polarity of strerror argument.
Signed-off-by: Brendan Jackman <jackmanb@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/bpf/20201203102234.648540-1-jackmanb@google.com
show more ...
|
#
a5f53b1d |
| 25-Aug-2020 |
Jiri Olsa <jolsa@kernel.org> |
tools resolve_btfids: Add support for set symbols
The set symbol does not have the unique number suffix, so we need to give it a special parsing function.
This was omitted in the first batch, becau
tools resolve_btfids: Add support for set symbols
The set symbol does not have the unique number suffix, so we need to give it a special parsing function.
This was omitted in the first batch, because there was no set support yet, so it slipped in the testing.
Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200825192124.710397-3-jolsa@kernel.org
show more ...
|
#
193a983c |
| 25-Aug-2020 |
Jiri Olsa <jolsa@kernel.org> |
tools resolve_btfids: Add size check to get_id function
To make sure we don't crash on malformed symbols.
Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.o
tools resolve_btfids: Add size check to get_id function
To make sure we don't crash on malformed symbols.
Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200825192124.710397-2-jolsa@kernel.org
show more ...
|
#
51f6463a |
| 19-Aug-2020 |
Jiri Olsa <jolsa@kernel.org> |
tools/resolve_btfids: Fix sections with wrong alignment
The data of compressed section should be aligned to 4 (for 32bit) or 8 (for 64 bit) bytes.
The binutils ld sets sh_addralign to 1, which make
tools/resolve_btfids: Fix sections with wrong alignment
The data of compressed section should be aligned to 4 (for 32bit) or 8 (for 64 bit) bytes.
The binutils ld sets sh_addralign to 1, which makes libelf fail with misaligned section error during the update as reported by Jesper:
FAILED elf_update(WRITE): invalid section alignment
While waiting for ld fix, we can fix compressed sections sh_addralign value manually.
Adding warning in -vv mode when the fix is triggered:
$ ./tools/bpf/resolve_btfids/resolve_btfids -vv vmlinux ... section(36) .comment, size 44, link 0, flags 30, type=1 section(37) .debug_aranges, size 45684, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 16, expected 8 section(38) .debug_info, size 129104957, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(39) .debug_abbrev, size 1152583, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(40) .debug_line, size 7374522, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(41) .debug_frame, size 702463, link 0, flags 800, type=1 section(42) .debug_str, size 1017571, link 0, flags 830, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(43) .debug_loc, size 3019453, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(44) .debug_ranges, size 1744583, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 16, expected 8 section(45) .symtab, size 2955888, link 46, flags 0, type=2 section(46) .strtab, size 2613072, link 0, flags 0, type=3 ... update ok for vmlinux
Another workaround is to disable compressed debug info data CONFIG_DEBUG_INFO_COMPRESSED kernel option.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Reported-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Yonghong Song <yhs@fb.com> Cc: Mark Wielaard <mjw@redhat.com> Cc: Nick Clifton <nickc@redhat.com> Link: https://lore.kernel.org/bpf/20200819092342.259004-1-jolsa@kernel.org
show more ...
|
#
d48556f4 |
| 06-Aug-2020 |
Stanislav Fomichev <sdf@google.com> |
bpf: Add missing return to resolve_btfids
int sets_patch(struct object *obj) doesn't have a 'return 0' at the end.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF objec
bpf: Add missing return to resolve_btfids
int sets_patch(struct object *obj) doesn't have a 'return 0' at the end.
Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200806155225.637202-1-sdf@google.com
show more ...
|
#
f86ca3cf |
| 02-Aug-2020 |
Andrii Nakryiko <andriin@fb.com> |
tools/resolve_btfids: Use libbpf's btf__parse() API
Instead of re-implementing generic BTF parsing logic, use libbpf's API. Also add .gitignore for resolve_btfids's build artifacts.
Signed-off-by:
tools/resolve_btfids: Use libbpf's btf__parse() API
Instead of re-implementing generic BTF parsing logic, use libbpf's API. Also add .gitignore for resolve_btfids's build artifacts.
Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200802013219.864880-4-andriin@fb.com
show more ...
|
#
fbbb68de |
| 11-Jul-2020 |
Jiri Olsa <jolsa@kernel.org> |
bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object
The resolve_btfids tool scans elf object for .BTF_ids section and resolves its symbols with BTF ID values.
It will be used to during li
bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object
The resolve_btfids tool scans elf object for .BTF_ids section and resolves its symbols with BTF ID values.
It will be used to during linking time to resolve arrays of BTF ID values used in verifier, so these IDs do not need to be resolved in runtime.
The expected layout of .BTF_ids section is described in main.c header. Related kernel changes are coming in following changes.
Build issue reported by 0-DAY CI Kernel Test Service.
Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200711215329.41165-2-jolsa@kernel.org
show more ...
|