========== build_32bit - FAILED ../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]; | ^~~~~~~ ../kernel/bpf/syscall.c: In function ‘load_fd’: ../kernel/bpf/syscall.c:6979:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 6979 | if (copy_from_user(obj->maps, (const void *)attr->load_fd.maps, | ^ ../kernel/bpf/syscall.c:6999:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 6999 | 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: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 ‘load_fd’: ../kernel/bpf/syscall.c:7283:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 7283 | if (copy_from_user(obj->maps, (const void *)attr->load_fd.maps, | ^ ../kernel/bpf/syscall.c:7303:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 7303 | 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 New errors added --- /tmp/tmp.Ay4RAMHO58 2025-01-09 14:50:08.330353882 -0800 +++ /tmp/tmp.nSXu2AFMq0 2025-01-09 14:50:20.157227487 -0800 @@ -16,0 +17,80 @@ +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) + | ~~~~~~~~~~~~^~~~ @@ -18,2 +98,2 @@ -../kernel/bpf/syscall.c:6979:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] - 6979 | if (copy_from_user(obj->maps, (const void *)attr->load_fd.maps, +../kernel/bpf/syscall.c:7283:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] + 7283 | if (copy_from_user(obj->maps, (const void *)attr->load_fd.maps, @@ -21,2 +101,2 @@ -../kernel/bpf/syscall.c:6999:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] - 6999 | if (copy_from_user(modules, (const void *)attr->load_fd.modules, +../kernel/bpf/syscall.c:7303:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] + 7303 | if (copy_from_user(modules, (const void *)attr->load_fd.modules, @@ -23,0 +104,7 @@ +../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) + | ^~~~~~~~~~~~~~~~~~~~ Per-file breakdown --- /tmp/tmp.mwT89mONid 2025-01-09 14:50:20.164227413 -0800 +++ /tmp/tmp.ZxBP8S8Lef 2025-01-09 14:50:20.167227381 -0800 @@ -1 +1,3 @@ - 5 ../kernel/bpf/syscall.c + 3 ../include/linux/kern_levels.h + 3 ../include/linux/printk.h + 12 ../kernel/bpf/syscall.c