Hi Martin, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] [cannot apply to bpf/master net/master v5.5-rc3 next-20191219] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Martin-KaFai-Lau/Introduce-BPF-STRUCT_OPS/20191224-085617 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: arm64-defconfig (attached as .config) compiler: aarch64-linux-gcc (GCC) 7.5.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.5.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): kernel/bpf/bpf_struct_ops.c: In function 'bpf_struct_ops_init': >> kernel/bpf/bpf_struct_ops.c:86:8: error: implicit declaration of function 'btf_distill_func_proto'; did you mean 'btf_type_is_func_proto'? [-Werror=implicit-function-declaration] btf_distill_func_proto(&log, _btf_vmlinux, ^~~~~~~~~~~~~~~~~~~~~~ btf_type_is_func_proto cc1: some warnings being treated as errors vim +86 kernel/bpf/bpf_struct_ops.c 37 38 void bpf_struct_ops_init(struct btf *_btf_vmlinux) 39 { 40 const struct btf_member *member; 41 struct bpf_struct_ops *st_ops; 42 struct bpf_verifier_log log = {}; 43 const struct btf_type *t; 44 const char *mname; 45 s32 type_id; 46 u32 i, j; 47 48 for (i = 0; i < ARRAY_SIZE(bpf_struct_ops); i++) { 49 st_ops = bpf_struct_ops[i]; 50 51 type_id = btf_find_by_name_kind(_btf_vmlinux, st_ops->name, 52 BTF_KIND_STRUCT); 53 if (type_id < 0) { 54 pr_warn("Cannot find struct %s in btf_vmlinux\n", 55 st_ops->name); 56 continue; 57 } 58 t = btf_type_by_id(_btf_vmlinux, type_id); 59 if (btf_type_vlen(t) > BPF_STRUCT_OPS_MAX_NR_MEMBERS) { 60 pr_warn("Cannot support #%u members in struct %s\n", 61 btf_type_vlen(t), st_ops->name); 62 continue; 63 } 64 65 for_each_member(j, t, member) { 66 const struct btf_type *func_proto; 67 68 mname = btf_name_by_offset(_btf_vmlinux, 69 member->name_off); 70 if (!*mname) { 71 pr_warn("anon member in struct %s is not supported\n", 72 st_ops->name); 73 break; 74 } 75 76 if (btf_member_bitfield_size(t, member)) { 77 pr_warn("bit field member %s in struct %s is not supported\n", 78 mname, st_ops->name); 79 break; 80 } 81 82 func_proto = btf_type_resolve_func_ptr(_btf_vmlinux, 83 member->type, 84 NULL); 85 if (func_proto && > 86 btf_distill_func_proto(&log, _btf_vmlinux, 87 func_proto, mname, 88 &st_ops->func_models[j])) { 89 pr_warn("Error in parsing func ptr %s in struct %s\n", 90 mname, st_ops->name); 91 break; 92 } 93 } 94 95 if (j == btf_type_vlen(t)) { 96 if (st_ops->init(_btf_vmlinux)) { 97 pr_warn("Error in init bpf_struct_ops %s\n", 98 st_ops->name); 99 } else { 100 st_ops->type_id = type_id; 101 st_ops->type = t; 102 } 103 } 104 } 105 } 106 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation