summaryrefslogtreecommitdiff
path: root/arch/x86/net
diff options
context:
space:
mode:
authorMykyta Yatsenko <yatsenko@meta.com>2024-03-18 16:18:08 +0300
committerAndrii Nakryiko <andrii@kernel.org>2024-03-18 23:45:11 +0300
commit7b30c296af6525571fc967f6a8661f6e1127369e (patch)
treeac27064d83f809fbec1e63ec44e67167d2622d5b /arch/x86/net
parent7f3edd0c72c3f7214f8f28495f2e6466348eb128 (diff)
downloadlinux-7b30c296af6525571fc967f6a8661f6e1127369e.tar.xz
libbpbpf: Check bpf_map/bpf_program fd validity
libbpf creates bpf_program/bpf_map structs for each program/map that user defines, but it allows to disable creating/loading those objects in kernel, in that case they won't have associated file descriptor (fd < 0). Such functionality is used for backward compatibility with some older kernels. Nothing prevents users from passing these maps or programs with no kernel counterpart to libbpf APIs. This change introduces explicit checks for kernel objects existence, aiming to improve visibility of those edge cases and provide meaningful warnings to users. Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20240318131808.95959-1-yatsenko@meta.com
Diffstat (limited to 'arch/x86/net')
0 files changed, 0 insertions, 0 deletions