bpftool: Support dumping kfunc prototypes from BTF
kernel test robot
build bot::::::
:::::: Manual check reason: "low confidence bisect report" ::::::
BCC: [email protected]
CC: [email protected]
In-Reply-To: <bf6c08f9263c4bd9d10a717de95199d766a13f61.1718207789.git.dxu@dxuuu.xyz>
References: <bf6c08f9263c4bd9d10a717de95199d766a13f61.1718207789.git.dxu@dxuuu.xyz>
TO: Daniel Xu <[email protected]>
Hi Daniel,
kernel test robot noticed the following build errors:
[auto build test ERROR on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Daniel-Xu/kbuild-bpf-Tell-pahole-to-DECL_TAG-kfuncs/20240613-000536 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master patch link: https://lore.kernel.org/r/bf6c08f9263c4bd9d10a717de95199d766a13f61.1718207789.git.dxu%40dxuuu.xyz patch subject: [PATCH bpf-next v5 12/12] bpftool: Support dumping kfunc prototypes from BTF
:::::: branch date: 18 hours ago
:::::: commit date: 18 hours ago
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240613/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/
All errors (new ones prefixed by >>):
In file included from progs/arena_htab.c:15:
In file included from tools/testing/selftests/bpf/bpf_arena_htab.h:5:
In file included from tools/testing/selftests/bpf/bpf_arena_alloc.h:4:
>> tools/testing/selftests/bpf/bpf_arena_common.h:45:15: error: conflicting types for 'bpf_arena_alloc_pages'
45 | void __arena* bpf_arena_alloc_pages(void *map, void __arena *addr, __u32 page_cnt,
| ^
/tools/include/vmlinux.h:143359:14: note: previous declaration is here
143359 | extern void *bpf_arena_alloc_pages(void *p__map, void *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
| ^
In file included from progs/arena_htab.c:15:
In file included from tools/testing/selftests/bpf/bpf_arena_htab.h:5:
In file included from tools/testing/selftests/bpf/bpf_arena_alloc.h:4:
>> tools/testing/selftests/bpf/bpf_arena_common.h:47:6: error: conflicting types for 'bpf_arena_free_pages'
47 | void bpf_arena_free_pages(void *map, void __arena *ptr, __u32 page_cnt) __ksym __weak;
| ^
/tools/include/vmlinux.h:143360:13: note: previous declaration is here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
In file included from progs/arena_htab.c:15:
In file included from tools/testing/selftests/bpf/bpf_arena_htab.h:5:
>> tools/testing/selftests/bpf/bpf_arena_alloc.h:33:8: error: assigning 'void *' to '__arena void *' changes address space of pointer
33 | page = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_arena_alloc.h:62:32: error: passing '__arena void *' to parameter of type 'void *' changes address space of pointer
62 | bpf_arena_free_pages(&arena, addr, 1);
| ^~~~
/tools/include/vmlinux.h:143360:54: note: passing argument to parameter 'ptr__ign' here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
In file included from progs/arena_htab.c:15:
>> tools/testing/selftests/bpf/bpf_arena_htab.h:95:16: error: initializing '__arena void *' with an expression of type 'void *' changes address space of pointer
95 | void __arena *buckets = bpf_arena_alloc_pages(&arena, NULL, 2, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 errors generated.
--
In file included from progs/arena_list.c:20:
In file included from tools/testing/selftests/bpf/bpf_arena_alloc.h:4:
>> tools/testing/selftests/bpf/bpf_arena_common.h:45:15: error: conflicting types for 'bpf_arena_alloc_pages'
45 | void __arena* bpf_arena_alloc_pages(void *map, void __arena *addr, __u32 page_cnt,
| ^
/tools/include/vmlinux.h:143359:14: note: previous declaration is here
143359 | extern void *bpf_arena_alloc_pages(void *p__map, void *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
| ^
In file included from progs/arena_list.c:20:
In file included from tools/testing/selftests/bpf/bpf_arena_alloc.h:4:
>> tools/testing/selftests/bpf/bpf_arena_common.h:47:6: error: conflicting types for 'bpf_arena_free_pages'
47 | void bpf_arena_free_pages(void *map, void __arena *ptr, __u32 page_cnt) __ksym __weak;
| ^
/tools/include/vmlinux.h:143360:13: note: previous declaration is here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
In file included from progs/arena_list.c:20:
>> tools/testing/selftests/bpf/bpf_arena_alloc.h:33:8: error: assigning 'void *' to '__arena void *' changes address space of pointer
33 | page = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_arena_alloc.h:62:32: error: passing '__arena void *' to parameter of type 'void *' changes address space of pointer
62 | bpf_arena_free_pages(&arena, addr, 1);
| ^~~~
/tools/include/vmlinux.h:143360:54: note: passing argument to parameter 'ptr__ign' here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
4 errors generated.
--
In file included from progs/verifier_arena.c:9:
>> tools/testing/selftests/bpf/bpf_arena_common.h:45:15: error: conflicting types for 'bpf_arena_alloc_pages'
45 | void __arena* bpf_arena_alloc_pages(void *map, void __arena *addr, __u32 page_cnt,
| ^
/tools/include/vmlinux.h:143359:14: note: previous declaration is here
143359 | extern void *bpf_arena_alloc_pages(void *p__map, void *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
| ^
In file included from progs/verifier_arena.c:9:
>> tools/testing/selftests/bpf/bpf_arena_common.h:47:6: error: conflicting types for 'bpf_arena_free_pages'
47 | void bpf_arena_free_pages(void *map, void __arena *ptr, __u32 page_cnt) __ksym __weak;
| ^
/tools/include/vmlinux.h:143360:13: note: previous declaration is here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
>> progs/verifier_arena.c:29:8: error: assigning 'void *' to '__arena int volatile *' changes address space of pointer
29 | page1 = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/verifier_arena.c:33:8: error: assigning 'void *' to '__arena int volatile *' changes address space of pointer
33 | page2 = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/verifier_arena.c:37:10: error: assigning 'void *' to '__arena int volatile *' changes address space of pointer
37 | no_page = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> progs/verifier_arena.c:44:31: error: passing '__arena void *' to parameter of type 'void *' changes address space of pointer
44 | bpf_arena_free_pages(&arena, (void __arena *)page2, 1);
| ^~~~~~~~~~~~~~~~~~~~~
/tools/include/vmlinux.h:143360:54: note: passing argument to parameter 'ptr__ign' here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
progs/verifier_arena.c:49:8: error: assigning 'void *' to '__arena int volatile *' changes address space of pointer
49 | page3 = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> progs/verifier_arena.c:68:8: error: assigning 'void *' to '__arena char volatile *' changes address space of pointer
68 | page1 = bpf_arena_alloc_pages(&arena, NULL, 2, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
progs/verifier_arena.c:86:31: error: passing '__arena void *' to parameter of type 'void *' changes address space of pointer
86 | bpf_arena_free_pages(&arena, (void __arena *)page1, 2);
| ^~~~~~~~~~~~~~~~~~~~~
/tools/include/vmlinux.h:143360:54: note: passing argument to parameter 'ptr__ign' here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
progs/verifier_arena.c:110:8: error: assigning 'void *' to '__arena char volatile *' changes address space of pointer
110 | pages = bpf_arena_alloc_pages(&ar->map, NULL, ar->map.max_entries, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 errors generated.
--
In file included from progs/verifier_arena_large.c:9:
>> tools/testing/selftests/bpf/bpf_arena_common.h:45:15: error: conflicting types for 'bpf_arena_alloc_pages'
45 | void __arena* bpf_arena_alloc_pages(void *map, void __arena *addr, __u32 page_cnt,
| ^
/tools/include/vmlinux.h:143359:14: note: previous declaration is here
143359 | extern void *bpf_arena_alloc_pages(void *p__map, void *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
| ^
In file included from progs/verifier_arena_large.c:9:
>> tools/testing/selftests/bpf/bpf_arena_common.h:47:6: error: conflicting types for 'bpf_arena_free_pages'
47 | void bpf_arena_free_pages(void *map, void __arena *ptr, __u32 page_cnt) __ksym __weak;
| ^
/tools/include/vmlinux.h:143360:13: note: previous declaration is here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
>> progs/verifier_arena_large.c:27:15: error: assigning 'void *' to '__arena void *' changes address space of pointer
27 | page1 = base = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> progs/verifier_arena_large.c:31:40: error: passing '__arena void *' to parameter of type 'void *' changes address space of pointer
31 | page2 = bpf_arena_alloc_pages(&arena, base + ARENA_SIZE - PAGE_SIZE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tools/include/vmlinux.h:143359:56: note: passing argument to parameter 'addr__ign' here
143359 | extern void *bpf_arena_alloc_pages(void *p__map, void *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
| ^
progs/verifier_arena_large.c:36:42: error: passing '__arena void *' to parameter of type 'void *' changes address space of pointer
36 | no_page = bpf_arena_alloc_pages(&arena, base + ARENA_SIZE,
| ^~~~~~~~~~~~~~~~~
/tools/include/vmlinux.h:143359:56: note: passing argument to parameter 'addr__ign' here
143359 | extern void *bpf_arena_alloc_pages(void *p__map, void *addr__ign, u32 page_cnt, int node_id, u64 flags) __weak __ksym;
| ^
progs/verifier_arena_large.c:44:31: error: passing '__arena void *' to parameter of type 'void *' changes address space of pointer
44 | bpf_arena_free_pages(&arena, (void __arena *)page1, 1);
| ^~~~~~~~~~~~~~~~~~~~~
/tools/include/vmlinux.h:143360:54: note: passing argument to parameter 'ptr__ign' here
143360 | extern void bpf_arena_free_pages(void *p__map, void *ptr__ign, u32 page_cnt) __weak __ksym;
| ^
>> progs/verifier_arena_large.c:49:8: error: assigning 'void *' to '__arena char volatile *' changes address space of pointer
49 | page3 = bpf_arena_alloc_pages(&arena, NULL, 1, NUMA_NO_NODE, 0);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~7 errors generated.
vim +/bpf_arena_alloc_pages +45 tools/testing/selftests/bpf/bpf_arena_common.h
80a4129fcf20da3 Alexei Starovoitov 2024-03-07 44
80a4129fcf20da3 Alexei Starovoitov 2024-03-07 @45 void __arena* bpf_arena_alloc_pages(void *map, void __arena *addr, __u32 page_cnt, 80a4129fcf20da3 Alexei Starovoitov 2024-03-07 46 int node_id, __u64 flags) __ksym __weak; 80a4129fcf20da3 Alexei Starovoitov 2024-03-07 @47 void bpf_arena_free_pages(void *map, void __arena *ptr, __u32 page_cnt) __ksym __weak;
80a4129fcf20da3 Alexei Starovoitov 2024-03-07 48
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki