linux/tools/lib/bpf
Tony Ambardar da18bfa59d libbpf: Ensure new BTF objects inherit input endianness
New split BTF needs to preserve base's endianness. Similarly, when
creating a distilled BTF, we need to preserve original endianness.

Fix by updating libbpf's btf__distill_base() and btf_new_empty() to retain
the byte order of any source BTF objects when creating new ones.

Fixes: ba451366bf ("libbpf: Implement basic split BTF support")
Fixes: 58e185a0dc ("libbpf: Add btf__distill_base() creating split BTF with distilled base BTF")
Reported-by: Song Liu <song@kernel.org>
Reported-by: Eduard Zingerman <eddyz87@gmail.com>
Suggested-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/6358db36c5f68b07873a0a5be2d062b1af5ea5f8.camel@gmail.com/
Link: https://lore.kernel.org/bpf/20240830095150.278881-1-tony.ambardar@gmail.com
2024-08-30 10:41:01 -07:00
..
.gitignore
bpf.c
bpf.h
bpf_core_read.h
bpf_endian.h
bpf_gen_internal.h
bpf_helpers.h
bpf_prog_linfo.c
bpf_tracing.h
btf.c libbpf: Ensure new BTF objects inherit input endianness 2024-08-30 10:41:01 -07:00
btf.h libbpf: Make btf_parse_elf process .BTF.base transparently 2024-06-17 14:38:31 -07:00
btf_dump.c libbpf: Fix no-args func prototype BTF dumping syntax 2024-07-17 22:42:47 +02:00
btf_iter.c libbpf,bpf: Share BTF relocate-related code with kernel 2024-06-21 14:45:07 -07:00
btf_relocate.c libbpf: Fix license for btf_relocate.c 2024-08-12 13:18:25 -07:00
Build libbpf: Split field iter code into its own file kernel 2024-06-21 14:45:07 -07:00
elf.c libbpf: Workaround -Wmaybe-uninitialized false positive 2024-08-15 15:56:40 -07:00
features.c
gen_loader.c
hashmap.c
hashmap.h
libbpf.c libbpf: Fix bpf_object__open_skeleton()'s mishandling of options 2024-08-29 17:47:27 +02:00
libbpf.h libbpf: Auto-attach struct_ops BPF maps in BPF skeleton 2024-06-06 10:06:05 -07:00
libbpf.map libbpf: Split BTF relocation 2024-06-17 14:38:31 -07:00
libbpf.pc.template
libbpf_common.h
libbpf_errno.c
libbpf_internal.h libbpf: Split BTF relocation 2024-06-17 14:38:31 -07:00
libbpf_legacy.h
libbpf_probes.c
libbpf_version.h
linker.c libbpf: Checking the btf_type kind when fixing variable offsets 2024-06-21 20:00:17 +02:00
Makefile
netlink.c
nlattr.c
nlattr.h
relo_core.c
relo_core.h
ringbuf.c
skel_internal.h
str_error.c
str_error.h
strset.c
strset.h
usdt.bpf.h
usdt.c
zip.c
zip.h