../kernel/bpf/syscall.c: In function ‘collect_externs’: ../kernel/bpf/syscall.c:6438:36: error: passing argument 1 of ‘sym_is_extern’ from incompatible pointer type [-Wincompatible-pointer-types] 6438 | if (!sym_is_extern(&sym[i])) | ^~~~~~~ | | | Elf32_Sym * {aka struct elf32_sym *} ../kernel/bpf/syscall.c:6082:44: note: expected ‘const Elf64_Sym *’ {aka ‘const struct elf64_sym *’} but argument is of type ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} 6082 | static bool sym_is_extern(const Elf64_Sym *sym) | ~~~~~~~~~~~~~~~~~^~~ ../kernel/bpf/syscall.c:6463:34: error: implicit declaration of function ‘bpf_core_essential_name_len’ [-Wimplicit-function-declaration] 6463 | ext_essent_len = bpf_core_essential_name_len(ext->name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../kernel/bpf/syscall.c: In function ‘find_elf_var_sym’: ../kernel/bpf/syscall.c:6664:32: error: returning ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} from a function with incompatible return type ‘Elf64_Sym *’ {aka ‘struct elf64_sym *’} [-Wincompatible-pointer-types] 6664 | return &sym[i]; | ^~~~~~~ In file included from ../include/asm-generic/bug.h:22, from ../arch/x86/include/asm/bug.h:99, from ../include/linux/ktime.h:24, from ../include/linux/timer.h:6, from ../include/linux/workqueue.h:9, from ../include/linux/bpf.h:10, from ../kernel/bpf/syscall.c:5: ../kernel/bpf/syscall.c: In function ‘program_record_reloc’: ../include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ../include/linux/printk.h:473:25: note: in definition of macro ‘printk_index_wrap’ 473 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ ../include/linux/printk.h:554:9: note: in expansion of macro ‘printk’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ ../include/linux/kern_levels.h:12:25: note: in expansion of macro ‘KERN_SOH’ 12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */ | ^~~~~~~~ ../include/linux/printk.h:554:16: note: in expansion of macro ‘KERN_WARNING’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~ ../kernel/bpf/syscall.c:7002:25: note: in expansion of macro ‘pr_warn’ 7002 | pr_warn("prog '%s': map relo failed to find map for section off %lu\n", | ^~~~~~~ ../include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ../include/linux/printk.h:473:25: note: in definition of macro ‘printk_index_wrap’ 473 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ ../include/linux/printk.h:554:9: note: in expansion of macro ‘printk’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ ../include/linux/kern_levels.h:12:25: note: in expansion of macro ‘KERN_SOH’ 12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */ | ^~~~~~~~ ../include/linux/printk.h:554:16: note: in expansion of macro ‘KERN_WARNING’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~ ../kernel/bpf/syscall.c:7023:17: note: in expansion of macro ‘pr_warn’ 7023 | pr_warn("prog '%s': data relo failed to find map for section (%lu:%lu)\n", | ^~~~~~~ ../include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ../include/linux/printk.h:473:25: note: in definition of macro ‘printk_index_wrap’ 473 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ ../include/linux/printk.h:554:9: note: in expansion of macro ‘printk’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ ../include/linux/kern_levels.h:12:25: note: in expansion of macro ‘KERN_SOH’ 12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */ | ^~~~~~~~ ../include/linux/printk.h:554:16: note: in expansion of macro ‘KERN_WARNING’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~ ../kernel/bpf/syscall.c:7023:17: note: in expansion of macro ‘pr_warn’ 7023 | pr_warn("prog '%s': data relo failed to find map for section (%lu:%lu)\n", | ^~~~~~~ ../kernel/bpf/syscall.c: In function ‘collect_prog_relocs’: ../kernel/bpf/syscall.c:7070:44: error: passing argument 6 of ‘program_record_reloc’ from incompatible pointer type [-Wincompatible-pointer-types] 7070 | &sym[sym_idx], | ^~~~~~~~~~~~~ | | | Elf32_Sym * {aka struct elf32_sym *} ../kernel/bpf/syscall.c:6893:50: note: expected ‘const Elf64_Sym *’ {aka ‘const struct elf64_sym *’} but argument is of type ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} 6893 | const Elf64_Sym *sym, const Elf64_Rel *rel) | ~~~~~~~~~~~~~~~~~^~~ ../kernel/bpf/syscall.c: In function ‘collect_relos’: ../kernel/bpf/syscall.c:7093:56: error: passing argument 2 of ‘collect_prog_relocs’ from incompatible pointer type [-Wincompatible-pointer-types] 7093 | err = collect_prog_relocs(obj, shdr, i); | ^~~~ | | | Elf32_Shdr * {aka struct elf32_shdr *} ../kernel/bpf/syscall.c:7035:65: note: expected ‘Elf64_Shdr *’ {aka ‘struct elf64_shdr *’} but argument is of type ‘Elf32_Shdr *’ {aka ‘struct elf32_shdr *’} 7035 | static int collect_prog_relocs(struct bpf_obj *obj, Elf64_Shdr *shdr, unsigned int shdr_idx) | ~~~~~~~~~~~~^~~~ ../kernel/bpf/syscall.c: In function ‘resolve_ksym_var_btf_id’: ../kernel/bpf/syscall.c:7156:15: error: implicit declaration of function ‘bpf_core_types_are_compat’ [-Wimplicit-function-declaration] 7156 | err = bpf_core_types_are_compat(obj->btf, local_type_id, | ^~~~~~~~~~~~~~~~~~~~~~~~~ ../kernel/bpf/syscall.c:7135:21: warning: variable ‘targ_var_name’ set but not used [-Wunused-but-set-variable] 7135 | const char *targ_var_name; | ^~~~~~~~~~~~~ ../kernel/bpf/syscall.c:7132:43: warning: variable ‘targ_type’ set but not used [-Wunused-but-set-variable] 7132 | const struct btf_type *targ_var, *targ_type; | ^~~~~~~~~ ../kernel/bpf/syscall.c: In function ‘load_fd’: ../kernel/bpf/syscall.c:7453:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 7453 | if (copy_from_user(obj->maps, (const void *)attr->load_fd.maps, | ^ ../kernel/bpf/syscall.c:7473:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 7473 | if (copy_from_user(modules, (const void *)attr->load_fd.modules, | ^ ../kernel/bpf/syscall.c: At top level: ../kernel/bpf/syscall.c:6817:13: warning: ‘insn_is_pseudo_func’ defined but not used [-Wunused-function] 6817 | static bool insn_is_pseudo_func(struct bpf_insn *insn) | ^~~~~~~~~~~~~~~~~~~ ../kernel/bpf/syscall.c:6797:13: warning: ‘insn_is_subprog_call’ defined but not used [-Wunused-function] 6797 | static bool insn_is_subprog_call(const struct bpf_insn *insn) | ^~~~~~~~~~~~~~~~~~~~ make[5]: *** [../scripts/Makefile.build:194: kernel/bpf/syscall.o] Error 1 make[4]: *** [../scripts/Makefile.build:440: kernel/bpf] Error 2 make[3]: *** [../scripts/Makefile.build:440: kernel] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/home/nipa/net-next/wt-1/Makefile:1993: .] Error 2 make[1]: *** [/home/nipa/net-next/wt-1/Makefile:251: __sub-make] Error 2 make: *** [Makefile:251: __sub-make] Error 2 ../kernel/bpf/syscall.c: In function ‘collect_externs’: ../kernel/bpf/syscall.c:6440:36: error: passing argument 1 of ‘sym_is_extern’ from incompatible pointer type [-Wincompatible-pointer-types] 6440 | if (!sym_is_extern(&sym[i])) | ^~~~~~~ | | | Elf32_Sym * {aka struct elf32_sym *} ../kernel/bpf/syscall.c:6084:44: note: expected ‘const Elf64_Sym *’ {aka ‘const struct elf64_sym *’} but argument is of type ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} 6084 | static bool sym_is_extern(const Elf64_Sym *sym) | ~~~~~~~~~~~~~~~~~^~~ ../kernel/bpf/syscall.c: In function ‘find_elf_var_sym’: ../kernel/bpf/syscall.c:6666:32: error: returning ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} from a function with incompatible return type ‘Elf64_Sym *’ {aka ‘struct elf64_sym *’} [-Wincompatible-pointer-types] 6666 | return &sym[i]; | ^~~~~~~ In file included from ../include/asm-generic/bug.h:22, from ../arch/x86/include/asm/bug.h:99, from ../include/linux/ktime.h:24, from ../include/linux/timer.h:6, from ../include/linux/workqueue.h:9, from ../include/linux/bpf.h:10, from ../kernel/bpf/syscall.c:5: ../kernel/bpf/syscall.c: In function ‘program_record_reloc’: ../include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘unsigned int’ [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ../include/linux/printk.h:473:25: note: in definition of macro ‘printk_index_wrap’ 473 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ ../include/linux/printk.h:554:9: note: in expansion of macro ‘printk’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ ../include/linux/kern_levels.h:12:25: note: in expansion of macro ‘KERN_SOH’ 12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */ | ^~~~~~~~ ../include/linux/printk.h:554:16: note: in expansion of macro ‘KERN_WARNING’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~ ../kernel/bpf/syscall.c:7004:25: note: in expansion of macro ‘pr_warn’ 7004 | pr_warn("prog '%s': map relo failed to find map for section off %lu\n", | ^~~~~~~ ../include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ../include/linux/printk.h:473:25: note: in definition of macro ‘printk_index_wrap’ 473 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ ../include/linux/printk.h:554:9: note: in expansion of macro ‘printk’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ ../include/linux/kern_levels.h:12:25: note: in expansion of macro ‘KERN_SOH’ 12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */ | ^~~~~~~~ ../include/linux/printk.h:554:16: note: in expansion of macro ‘KERN_WARNING’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~ ../kernel/bpf/syscall.c:7025:17: note: in expansion of macro ‘pr_warn’ 7025 | pr_warn("prog '%s': data relo failed to find map for section (%lu:%lu)\n", | ^~~~~~~ ../include/linux/kern_levels.h:5:25: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ../include/linux/printk.h:473:25: note: in definition of macro ‘printk_index_wrap’ 473 | _p_func(_fmt, ##__VA_ARGS__); \ | ^~~~ ../include/linux/printk.h:554:9: note: in expansion of macro ‘printk’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~ ../include/linux/kern_levels.h:12:25: note: in expansion of macro ‘KERN_SOH’ 12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */ | ^~~~~~~~ ../include/linux/printk.h:554:16: note: in expansion of macro ‘KERN_WARNING’ 554 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~ ../kernel/bpf/syscall.c:7025:17: note: in expansion of macro ‘pr_warn’ 7025 | pr_warn("prog '%s': data relo failed to find map for section (%lu:%lu)\n", | ^~~~~~~ ../kernel/bpf/syscall.c: In function ‘collect_prog_relocs’: ../kernel/bpf/syscall.c:7072:44: error: passing argument 6 of ‘program_record_reloc’ from incompatible pointer type [-Wincompatible-pointer-types] 7072 | &sym[sym_idx], | ^~~~~~~~~~~~~ | | | Elf32_Sym * {aka struct elf32_sym *} ../kernel/bpf/syscall.c:6895:50: note: expected ‘const Elf64_Sym *’ {aka ‘const struct elf64_sym *’} but argument is of type ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} 6895 | const Elf64_Sym *sym, const Elf64_Rel *rel) | ~~~~~~~~~~~~~~~~~^~~ ../kernel/bpf/syscall.c: In function ‘collect_relos’: ../kernel/bpf/syscall.c:7095:56: error: passing argument 2 of ‘collect_prog_relocs’ from incompatible pointer type [-Wincompatible-pointer-types] 7095 | err = collect_prog_relocs(obj, shdr, i); | ^~~~ | | | Elf32_Shdr * {aka struct elf32_shdr *} ../kernel/bpf/syscall.c:7037:65: note: expected ‘Elf64_Shdr *’ {aka ‘struct elf64_shdr *’} but argument is of type ‘Elf32_Shdr *’ {aka ‘struct elf32_shdr *’} 7037 | static int collect_prog_relocs(struct bpf_obj *obj, Elf64_Shdr *shdr, unsigned int shdr_idx) | ~~~~~~~~~~~~^~~~ ../kernel/bpf/syscall.c: In function ‘resolve_ksym_var_btf_id’: ../kernel/bpf/syscall.c:7137:21: warning: variable ‘targ_var_name’ set but not used [-Wunused-but-set-variable] 7137 | const char *targ_var_name; | ^~~~~~~~~~~~~ ../kernel/bpf/syscall.c:7134:43: warning: variable ‘targ_type’ set but not used [-Wunused-but-set-variable] 7134 | const struct btf_type *targ_var, *targ_type; | ^~~~~~~~~ ../kernel/bpf/syscall.c: In function ‘relocate_core’: ../kernel/bpf/syscall.c:7281:21: warning: variable ‘sec_name’ set but not used [-Wunused-but-set-variable] 7281 | const char *sec_name; | ^~~~~~~~ ../kernel/bpf/syscall.c: In function ‘load_fd’: ../kernel/bpf/syscall.c:7938:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 7938 | if (copy_from_user(obj->maps, (const void *)attr->load_fd.maps, | ^ ../kernel/bpf/syscall.c:7958:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 7958 | if (copy_from_user(modules, (const void *)attr->load_fd.modules, | ^ make[5]: *** [../scripts/Makefile.build:194: kernel/bpf/syscall.o] Error 1 make[4]: *** [../scripts/Makefile.build:440: kernel/bpf] Error 2 make[3]: *** [../scripts/Makefile.build:440: kernel] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [/home/nipa/net-next/wt-1/Makefile:1993: .] Error 2 make[1]: *** [/home/nipa/net-next/wt-1/Makefile:251: __sub-make] Error 2 make: *** [Makefile:251: __sub-make] Error 2