linux-kernelorg-stable/kernel/bpf
KaFai Wan 863aab3d4d bpf: Add log for attaching tracing programs to functions in deny list
Show the rejected function name when attaching tracing programs to
functions in deny list.

With this change, we know why tracing programs can't attach to functions
like __rcu_read_lock() from log.

$ ./fentry
libbpf: prog '__rcu_read_lock': BPF program load failed: -EINVAL
libbpf: prog '__rcu_read_lock': -- BEGIN PROG LOAD LOG --
Attaching tracing programs to function '__rcu_read_lock' is rejected.

Suggested-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: KaFai Wan <kafai.wan@linux.dev>
Acked-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20250724151454.499040-3-kafai.wan@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-07-28 19:39:29 -07:00
..
preload umd: Remove usermode driver framework 2025-07-26 21:03:04 +02:00
Kconfig
Makefile bpf: Introduce BPF standard streams 2025-07-03 19:30:06 -07:00
arena.c bpf/arena: add bpf_arena_reserve_pages kfunc 2025-07-11 10:43:54 -07:00
arraymap.c bpf: add btf_type_is_i{32,64} helpers 2025-06-25 15:15:49 -07:00
bloom_filter.c
bpf_cgrp_storage.c
bpf_inode_storage.c
bpf_iter.c bpf: Add attach_type field to bpf_link 2025-07-11 10:51:55 -07:00
bpf_local_storage.c bpf: add btf_type_is_i{32,64} helpers 2025-06-25 15:15:49 -07:00
bpf_lru_list.c bpf: Adjust free target to avoid global starvation of LRU map 2025-06-18 18:50:14 -07:00
bpf_lru_list.h bpf: Adjust free target to avoid global starvation of LRU map 2025-06-18 18:50:14 -07:00
bpf_lsm.c
bpf_struct_ops.c bpf: Add attach_type field to bpf_link 2025-07-11 10:51:55 -07:00
bpf_task_storage.c
btf.c bpf: Clean up individual BTF_ID code 2025-07-16 18:34:42 -07:00
btf_iter.c
btf_relocate.c
cgroup.c bpf: Use ERR_CAST instead of ERR_PTR(PTR_ERR(...)) 2025-07-21 17:27:09 -07:00
cgroup_iter.c
core.c bpf: Move bpf_jit_get_prog_name() to core.c 2025-07-26 21:26:51 +02:00
cpumap.c
cpumask.c
crypto.c
devmap.c
disasm.c
disasm.h
dispatcher.c
dmabuf_iter.c bpf: Add open coded dmabuf iterator 2025-05-27 09:51:25 -07:00
hashtab.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf after rc4 2025-04-28 08:40:45 -07:00
helpers.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf after rc6 2025-07-18 12:15:59 -07:00
inode.c VFS: rename lookup_one_len family to lookup_noperm and remove permission check 2025-04-08 11:24:36 +02:00
kmem_cache_iter.c
link_iter.c bpf: Clean up individual BTF_ID code 2025-07-16 18:34:42 -07:00
local_storage.c bpf: add btf_type_is_i{32,64} helpers 2025-06-25 15:15:49 -07:00
log.c
lpm_trie.c bpf: Convert lpm_trie.c to rqspinlock 2025-03-19 08:03:05 -07:00
map_in_map.c
map_in_map.h
map_iter.c
memalloc.c
mmap_unlock_work.h
mprog.c
net_namespace.c bpf: Remove attach_type in bpf_netns_link 2025-07-11 11:01:04 -07:00
offload.c
percpu_freelist.c bpf: Convert percpu_freelist.c to rqspinlock 2025-03-19 08:03:05 -07:00
percpu_freelist.h bpf: Convert percpu_freelist.c to rqspinlock 2025-03-19 08:03:05 -07:00
prog_iter.c bpf: Clean up individual BTF_ID code 2025-07-16 18:34:42 -07:00
queue_stack_maps.c bpf: Convert queue_stack map to rqspinlock 2025-04-10 12:51:10 -07:00
range_tree.c
range_tree.h
relo_core.c
reuseport_array.c
ringbuf.c bpf: Convert ringbuf map to rqspinlock 2025-04-11 10:28:26 -07:00
rqspinlock.c bpf: Report rqspinlock deadlocks/timeout to BPF stderr 2025-07-03 19:30:07 -07:00
rqspinlock.h rqspinlock: Protect waiters in queue from stalls 2025-03-19 08:03:05 -07:00
stackmap.c
stream.c bpf: Fix improper int-to-ptr cast in dump_stack_cb 2025-07-07 08:30:15 -07:00
syscall.c bpf: Add struct bpf_token_info 2025-07-16 18:38:05 -07:00
sysfs_btf.c btf: Fix virt_to_phys() on arm64 when mmapping BTF 2025-07-17 11:33:52 -07:00
task_iter.c
tcx.c bpf: Remove location field in tcx_link 2025-07-11 11:00:57 -07:00
tnum.c bpf: Add range tracking for BPF_NEG 2025-06-25 15:12:17 -07:00
token.c bpf: Add struct bpf_token_info 2025-07-16 18:38:05 -07:00
trampoline.c bpf: Add attach_type field to bpf_link 2025-07-11 10:51:55 -07:00
verifier.c bpf: Add log for attaching tracing programs to functions in deny list 2025-07-28 19:39:29 -07:00