libbpf: Fix BTF-defined map-in-map initialization on 32-bit host arches
authorAndrii Nakryiko <andriin@fb.com>
Thu, 13 Aug 2020 20:49:39 +0000 (13:49 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 13 Aug 2020 23:45:41 +0000 (16:45 -0700)
commit15728ad3e71c120278105f20fa65b3735e715e0f
treee3535002fcf2fec5cddcf456ed3a54318289a689
parent9028bbcc3e12510cac13a9554f1a1e39667a4387
libbpf: Fix BTF-defined map-in-map initialization on 32-bit host arches

Libbpf built in 32-bit mode should be careful about not conflating 64-bit BPF
pointers in BPF ELF file and host architecture pointers. This patch fixes
issue of incorrect initializating of map-in-map inner map slots due to such
difference.

Fixes: 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map support")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200813204945.1020225-4-andriin@fb.com
tools/lib/bpf/libbpf.c