acrn-kernel/tools/lib
Toke Høiland-Jørgensen 113e6b7e15 libbpf: Sanitise internal map names so they are not rejected by the kernel
The kernel only accepts map names with alphanumeric characters, underscores
and periods in their name. However, the auto-generated internal map names
used by libbpf takes their prefix from the user-supplied BPF object name,
which has no such restriction. This can lead to "Invalid argument" errors
when trying to load a BPF program using global variables.

Fix this by sanitising the map names, replacing any non-allowed characters
with underscores.

Fixes: d859900c4c ("bpf, libbpf: support global data/bss/rodata sections")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200217171701.215215-1-toke@redhat.com
2020-02-18 15:34:20 +01:00
..
api tools lib api fs: Fix gcc9 stringop-truncation compilation error 2020-01-06 11:46:09 -03:00
bpf libbpf: Sanitise internal map names so they are not rejected by the kernel 2020-02-18 15:34:20 +01:00
lockdep
perf libperf: Setup initial evlist::all_cpus value 2020-01-14 12:02:19 -03:00
subcmd libsubcmd: Use -O0 with DEBUG=1 2019-11-06 15:49:39 -03:00
symbol
traceevent tools lib traceevent: Fix memory leakage in filter_event 2019-12-20 18:47:50 -03:00
argv_split.c
bitmap.c tools bitmap: Implement bitmap_equal() operation at bitmap API 2020-01-06 11:46:04 -03:00
ctype.c
find_bit.c
hweight.c
rbtree.c
str_error_r.c
string.c tools lib: Fix builds when glibc contains strlcpy() 2020-01-06 11:46:10 -03:00
vsprintf.c
zalloc.c