Thread (8 messages) 8 messages, 3 authors, 2020-02-19

Re: [PATCH bpf] libbpf: Sanitise internal map names so they are not rejected by the kernel

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2020-02-18 14:40:35
Also in: bpf

On 2/17/20 6:17 PM, Toke Høiland-Jørgensen wrote:
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: d859900c4c56 ("bpf, libbpf: support global data/bss/rodata sections")
Signed-off-by: Toke Høiland-Jørgensen <redacted>
Makes sense to me, applied, thanks! I presume you had something like '-' in the
global var leading to rejection?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help