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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 09:49:09 +0000 (11:49 +0200)
commit93c39ebb5d44cb05b59e0b8504b4c8da057c5f05
tree1cf0cb42fa3cb6bb50d04dc3533d722dea3870d6
parentdb7f8c57dbdd31f7e59f8dc8d1e1b38607a320ef
libbpf: Fix BTF-defined map-in-map initialization on 32-bit host arches

[ Upstream commit 15728ad3e71c120278105f20fa65b3735e715e0f ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/lib/bpf/libbpf.c