]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
bpf: Add syscall common attributes support for map_create
authorLeon Hwang <leon.hwang@linux.dev>
Tue, 12 May 2026 15:31:55 +0000 (23:31 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 12 May 2026 19:44:44 +0000 (12:44 -0700)
commit49f9b2b2a18c5ce06b21fc2b3399352d80dee0c6
tree5ffdf2578232e9bb355da027f6b8a2527dc9492c
parentceeb7eda94a3548958b30818495ef7eb12898727
bpf: Add syscall common attributes support for map_create

Many BPF_MAP_CREATE validation failures currently return -EINVAL without
any explanation to userspace.

Plumb common syscall log attributes into map_create(), create a verifier
log from bpf_common_attr::log_buf/log_size/log_level, and report
map-creation failure reasons through that buffer.

This improves debuggability by allowing userspace to inspect why map
creation failed and read back log_true_size from common attributes.

Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20260512153157.28382-7-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf_verifier.h
kernel/bpf/log.c
kernel/bpf/syscall.c