linux-yocto/kernel/bpf
Xi Ruoyao 92c6f8c577 bpf: Fix BPF_INTERNAL namespace import
The commit cdd30ebb1b9f ("module: Convert symbol namespace to string
literal") makes the grammar of MODULE_IMPORT_NS and EXPORT_SYMBOL_NS
different between the stable branches and the mainline.  But when
the commit 955f9ede52 ("bpf: Add namespace to BPF internal symbols")
was backported from mainline, only EXPORT_SYMBOL_NS instances are
adapted, leaving the MODULE_IMPORT_NS instance with the "new" grammar
and causing the module fails to build:

    ERROR: modpost: module bpf_preload uses symbol bpf_link_get_from_fd from namespace BPF_INTERNAL, but does not import it.
    ERROR: modpost: module bpf_preload uses symbol kern_sys_bpf from namespace BPF_INTERNAL, but does not import it.

Reported-by: Mingcong Bai <jeffbai@aosc.io>
Reported-by: Alex Davis <alex47794@gmail.com>
Closes: https://lore.kernel.org/all/CADiockBKBQTVqjA5G+RJ9LBwnEnZ8o0odYnL=LBZ_7QN=_SZ7A@mail.gmail.com/
Fixes: 955f9ede52 ("bpf: Add namespace to BPF internal symbols")
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-05 11:00:29 +02:00
..
preload bpf: Fix BPF_INTERNAL namespace import 2025-05-05 11:00:29 +02:00
arena.c bpf: Fix softlockup in arena_map_free on 64k page kernel 2025-02-27 04:30:19 -08:00
arraymap.c bpf: Prevent tailcall infinite loop caused by freplace 2024-12-14 20:03:49 +01:00
bloom_filter.c
bpf_cgrp_storage.c bpf: Only fails the busy counter check in bpf_cgrp_storage_get if it creates storage 2025-05-02 07:59:16 +02:00
bpf_inode_storage.c bpf: switch fdget_raw() uses to CLASS(fd_raw, ...) 2024-08-13 15:58:10 -07:00
bpf_iter.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
bpf_local_storage.c bpf: bpf_local_storage: Always use bpf_mem_alloc in PREEMPT_RT 2025-02-08 09:57:29 +01:00
bpf_lru_list.c
bpf_lru_list.h
bpf_lsm.c bpf, lsm: Remove bpf_lsm_key_free hook 2024-10-08 12:52:40 -07:00
bpf_struct_ops.c bpf: Reject struct_ops registration that uses module ptr and the module btf_id is missing 2025-02-08 09:57:30 +01:00
bpf_task_storage.c
btf_iter.c bpf: Remove custom build rule 2024-08-30 08:55:26 -07:00
btf_relocate.c bpf: Remove custom build rule 2024-08-30 08:55:26 -07:00
btf.c net: Add rx_skb of kfree_skb to raw_tp_null_args[]. 2025-02-27 04:30:19 -08:00
cgroup_iter.c
cgroup.c cgroup/bpf: use a dedicated workqueue for cgroup bpf destruction 2024-10-08 08:43:22 -10:00
core.c bpf: Fix array bounds error with may_goto 2025-04-10 14:39:21 +02:00
cpumap.c bpf, cpumap: Move xdp:xdp_cpumap_kthread tracepoint before rcv 2024-09-11 16:32:11 +02:00
cpumask.c
crypto.c bpf: crypto: make state and IV dynptr nullable 2024-06-13 16:33:04 -07:00
devmap.c bpf: fix OOB devmap writes when deleting elements 2024-12-14 20:03:30 +01:00
disasm.c
disasm.h
dispatcher.c bpf: Add kernel symbol for struct_ops trampoline 2024-12-05 14:01:57 +01:00
hashtab.c bpf: Fix kmemleak warning for percpu hashmap 2025-05-02 07:59:15 +02:00
helpers.c bpf: Cancel the running bpf_timer through kworker for PREEMPT_RT 2025-02-08 09:57:36 +01:00
inode.c bpf: Preserve param->string when parsing mount options 2024-10-22 12:56:38 -07:00
Kconfig bpf: remove CONFIG_BPF_JIT dependency on CONFIG_MODULES of 2024-05-14 00:36:29 -07:00
link_iter.c
local_storage.c bpf: Replace 8 seq_puts() calls by seq_putc() calls 2024-07-29 12:53:00 -07:00
log.c bpf: Fix print_reg_state's constant scalar dump 2024-10-17 11:06:34 -07:00
lpm_trie.c bpf: Fix exact match conditions in trie_get_next_key() 2024-12-14 20:03:19 +01:00
Makefile bpf: Remove custom build rule 2024-08-30 08:55:26 -07:00
map_in_map.c bpf: switch maps to CLASS(fd, ...) 2024-08-13 15:58:17 -07:00
map_in_map.h
map_iter.c
memalloc.c bpf: Add bpf_mem_alloc_check_size() helper 2024-10-30 12:13:46 -07:00
mmap_unlock_work.h
mprog.c
net_namespace.c
offload.c
percpu_freelist.c
percpu_freelist.h
prog_iter.c
queue_stack_maps.c
relo_core.c bpf: Remove custom build rule 2024-08-30 08:55:26 -07:00
reuseport_array.c bpf: Use sockfd_put() helper 2024-08-30 08:57:47 -07:00
ringbuf.c bpf: unify VM_WRITE vs VM_MAYWRITE use in BPF map mmaping logic 2025-02-27 04:30:18 -08:00
stackmap.c bpf: wire up sleepable bpf_get_stack() and bpf_get_task_stack() helpers 2024-09-11 09:58:31 -07:00
syscall.c bpf: Add namespace to BPF internal symbols 2025-05-02 07:59:04 +02:00
sysfs_btf.c
task_iter.c bpf: Fix iter/task tid filtering 2024-10-17 10:52:18 -07:00
tcx.c
tnum.c
token.c bpf: convert bpf_token_create() to CLASS(fd, ...) 2024-09-12 18:58:02 -07:00
trampoline.c bpf: Prevent tailcall infinite loop caused by freplace 2024-12-14 20:03:49 +01:00
verifier.c bpf: Reject attaching fexit/fmod_ret to __noreturn functions 2025-05-02 07:59:16 +02:00