]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libbpf: Support creating light skeleton of either endianness
authorTony Ambardar <tony.ambardar@gmail.com>
Mon, 16 Sep 2024 08:37:46 +0000 (01:37 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 4 Oct 2024 00:47:36 +0000 (17:47 -0700)
commit8ca3323dce43792b6a7bbbc3314fc2a281d3af92
treedbe1c67a487dd3878271c215d3b3557e9dd9f00d
parent0aed726cf6f97bfe11de693781504787857894b7
libbpf: Support creating light skeleton of either endianness

Track target endianness in 'struct bpf_gen' and process in-memory data in
native byte-order, but on finalization convert the embedded loader BPF
insns to target endianness.

The light skeleton also includes a target-accessed data blob which is
heterogeneous and thus difficult to convert to target byte-order on
finalization. Add support functions to convert data to target endianness
as it is added to the blob.

Also add additional debug logging for data blob structure details and
skeleton loading.

Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/569562e1d5bf1cce80a1f1a3882461ee2da1ffd5.1726475448.git.tony.ambardar@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf_gen_internal.h
tools/lib/bpf/gen_loader.c
tools/lib/bpf/libbpf.c
tools/lib/bpf/skel_internal.h