bpf: save extended inner map info for percpu array maps as well
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 15 May 2024 06:24:39 +0000 (23:24 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 May 2024 16:34:54 +0000 (09:34 -0700)
commit9ee98229083186837199912a7debb666146b8c17
treeec01949d678ef183fc8ac9707ee5eaaeb7e62e04
parent325423cafc12031a69692363ddcabc63113bb3d6
bpf: save extended inner map info for percpu array maps as well

ARRAY_OF_MAPS and HASH_OF_MAPS map types have special logic to save
a few extra fields required for correct operations of ARRAY maps, when
they are used as inner maps. PERCPU_ARRAY maps have similar
requirements as they now support generating inline element lookup
logic. So make sure that both classes of maps are handled correctly.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Fixes: db69718b8efa ("bpf: inline bpf_map_lookup_elem() for PERCPU_ARRAY maps")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20240515062440.846086-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/map_in_map.c