../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 ../kernel/bpf/syscall.c: In function ‘collect_externs’: ../kernel/bpf/syscall.c:6482:36: error: passing argument 1 of ‘sym_is_extern’ from incompatible pointer type [-Wincompatible-pointer-types] 6482 | if (!sym_is_extern(&sym[i])) | ^~~~~~~ | | | Elf32_Sym * {aka struct elf32_sym *} ../kernel/bpf/syscall.c:6126:44: note: expected ‘const Elf64_Sym *’ {aka ‘const struct elf64_sym *’} but argument is of type ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} 6126 | static bool sym_is_extern(const Elf64_Sym *sym) | ~~~~~~~~~~~~~~~~~^~~ ../kernel/bpf/syscall.c: In function ‘find_elf_var_sym’: ../kernel/bpf/syscall.c:6708: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] 6708 | 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:7046:25: note: in expansion of macro ‘pr_warn’ 7046 | 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:7067:17: note: in expansion of macro ‘pr_warn’ 7067 | 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:7067:17: note: in expansion of macro ‘pr_warn’ 7067 | 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:7114:44: error: passing argument 6 of ‘program_record_reloc’ from incompatible pointer type [-Wincompatible-pointer-types] 7114 | &sym[sym_idx], | ^~~~~~~~~~~~~ | | | Elf32_Sym * {aka struct elf32_sym *} ../kernel/bpf/syscall.c:6937:50: note: expected ‘const Elf64_Sym *’ {aka ‘const struct elf64_sym *’} but argument is of type ‘Elf32_Sym *’ {aka ‘struct elf32_sym *’} 6937 | const Elf64_Sym *sym, const Elf64_Rel *rel) | ~~~~~~~~~~~~~~~~~^~~ ../kernel/bpf/syscall.c: In function ‘collect_relos’: ../kernel/bpf/syscall.c:7137:56: error: passing argument 2 of ‘collect_prog_relocs’ from incompatible pointer type [-Wincompatible-pointer-types] 7137 | err = collect_prog_relocs(obj, shdr, i); | ^~~~ | | | Elf32_Shdr * {aka struct elf32_shdr *} ../kernel/bpf/syscall.c:7079:65: note: expected ‘Elf64_Shdr *’ {aka ‘struct elf64_shdr *’} but argument is of type ‘Elf32_Shdr *’ {aka ‘struct elf32_shdr *’} 7079 | 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:7179:21: warning: variable ‘targ_var_name’ set but not used [-Wunused-but-set-variable] 7179 | const char *targ_var_name; | ^~~~~~~~~~~~~ ../kernel/bpf/syscall.c:7176:43: warning: variable ‘targ_type’ set but not used [-Wunused-but-set-variable] 7176 | const struct btf_type *targ_var, *targ_type; | ^~~~~~~~~ ../kernel/bpf/syscall.c: In function ‘relocate_core’: ../kernel/bpf/syscall.c:7323:21: warning: variable ‘sec_name’ set but not used [-Wunused-but-set-variable] 7323 | const char *sec_name; | ^~~~~~~~ ../kernel/bpf/syscall.c: In function ‘load_fd’: ../kernel/bpf/syscall.c:7980:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 7980 | if (copy_from_user(obj->maps, (const void *)attr->load_fd.maps, | ^ ../kernel/bpf/syscall.c:8000:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 8000 | 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