linux-stable/tools/lib
JP Kobryn 9d0a23313b libbpf: Add capability for resizing datasec maps
This patch updates bpf_map__set_value_size() so that if the given map is
memory mapped, it will attempt to resize the mapped region. Initial
contents of the mapped region are preserved. BTF is not required, but
after the mapping is resized an attempt is made to adjust the associated
BTF information if the following criteria is met:
 - BTF info is present
 - the map is a datasec
 - the final variable in the datasec is an array

... the resulting BTF info will be updated so that the final array
variable is associated with a new BTF array type sized to cover the
requested size.

Note that the initial resizing of the memory mapped region can succeed
while the subsequent BTF adjustment can fail. In this case, BTF info is
dropped from the map by clearing the key and value type.

Signed-off-by: JP Kobryn <inwardvessel@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20230524004537.18614-2-inwardvessel@gmail.com
2023-05-24 11:44:16 -07:00
..
api tools api: Add io__getline 2023-04-04 13:23:59 -03:00
bpf libbpf: Add capability for resizing datasec maps 2023-05-24 11:44:16 -07:00
perf libperf rc_check: Enable implicitly with sanitizers 2023-04-20 15:12:02 -03:00
subcmd tools lib subcmd: Add dependency test to install_headers 2022-12-14 11:16:12 -03:00
symbol tools lib symbol: Add dependency test to install_headers 2022-12-14 11:16:12 -03:00
thermal tools/lib/thermal: Fix include path for libnl3 in pkg-config file. 2023-02-15 17:29:40 +01:00
argv_split.c
bitmap.c Bitmap patches for v6.0-rc1 2022-08-07 17:52:35 -07:00
ctype.c
find_bit.c tools: sync find_bit() implementation 2022-09-21 12:21:44 -07:00
hweight.c
list_sort.c tools lib: Adopt list_sort() from the kernel sources 2021-10-20 10:30:59 -03:00
rbtree.c tools/: replace HTTP links with HTTPS ones 2020-08-07 11:33:21 -07:00
slab.c tools: Move gfp.h and slab.h from radix-tree to lib 2022-02-20 08:44:37 +02:00
str_error_r.c
string.c tools lib: Adopt memchr_inv() from kernel 2020-11-27 08:34:52 -03:00
vsprintf.c
zalloc.c