Re: [PATCH 6.6 000/538] 6.6.54-rc1 review

From: Harshit Mogalapalli
Date: Thu Oct 03 2024 - 01:00:01 EST



Hi Greg,

Below are few build errors in libbpf code:

Here are few libbpf commits:
David Vernet <void@xxxxxxxxxxxxx>
libbpf: Don't take direct pointers into BTF data from st_ops

Eduard Zingerman <eddyz87@xxxxxxxxx>
libbpf: Sync progs autoload with maps autocreate for struct_ops maps

Kui-Feng Lee <thinker.li@xxxxxxxxx>
libbpf: Convert st_ops->data to shadow type.

Kui-Feng Lee <thinker.li@xxxxxxxxx>
libbpf: Find correct module BTFs for struct_ops maps and progs.

Andrii Nakryiko <andrii@xxxxxxxxxx>
libbpf: use stable map placeholder FDs



+ make -s ARCH=x86 KBUILD_SYMTYPES=y -j32 bzImage modules
In file included from /usr/include/stdio.h:33,
from /builddir/build/BUILD/kernel-6.6.54/linux-6.6.54-master.20241002.el9.dev/tools/include/linux/panic.h:6,
from /builddir/build/BUILD/kernel-6.6.54/linux-6.6.54-master.20241002.el9.dev/tools/include/linux/kernel.h:11,
from bpf.c:32:
bpf.c: In function 'bpf_map_create':
libbpf_internal.h:107:10: error: 'union bpf_attr' has no member named 'value_type_btf_obj_fd'
107 | (offsetof(TYPE, FIELD) + sizeof(((TYPE *)0)->FIELD))
| ^~~~~~~~
bpf.c:172:32: note: in expansion of macro 'offsetofend'
172 | const size_t attr_sz = offsetofend(union bpf_attr,
| ^~~~~~~~~~~
In file included from bpf.c:37:
libbpf_internal.h:107:52: error: 'union bpf_attr' has no member named 'value_type_btf_obj_fd'
107 | (offsetof(TYPE, FIELD) + sizeof(((TYPE *)0)->FIELD))
| ^~
bpf.c:172:32: note: in expansion of macro 'offsetofend'
172 | const size_t attr_sz = offsetofend(union bpf_attr,
| ^~~~~~~~~~~
bpf.c:195:13: error: 'union bpf_attr' has no member named 'value_type_btf_obj_fd'
195 | attr.value_type_btf_obj_fd = OPTS_GET(opts, value_type_btf_obj_fd, 0);
| ^
make[5]: *** [/builddir/build/BUILD/kernel-6.6.54/linux-6.6.54-master.20241002.el9.dev/tools/build/Makefile.build:97: /builddir/build/BUILD/kernel-6.6.54/linux-6.6.54-master.20241002.el9.dev/tools/bpf/resolve_btfids/libbpf/staticobjs/bpf.o] Error 1
make[5]: *** Waiting for unfinished jobs....
libbpf.c: In function 'bpf_object__create_map':
libbpf.c:5215:50: error: 'BPF_F_VTYPE_BTF_OBJ_FD' undeclared (first use in this function)
5215 | create_attr.map_flags |= BPF_F_VTYPE_BTF_OBJ_FD;
| ^~~~~~~~~~~~~~~~~~~~~~
libbpf.c:5215:50: note: each undeclared identifier is reported only once for each function it appears in

Looks like we have more than one compilation error in libbpf code.




Thanks,
Harshit