Hi Yonghong,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master net/master net-next/master linus/master v5.7-rc1
next-20200416]
[cannot apply to vhost/linux-next ipvs/master]
[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/Yonghong-Song/bpf-implement-bpf-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-debian-10.3 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel//bpf/dump.c: In function 'bpf_dump_query':
> kernel//bpf/dump.c:143:28: error: 'struct
bpfdump_target_info' has no member named 'prog_ctx_type_name'
prog_ctx_type_name = tinfo->prog_ctx_type_name;
^~
vim +143 kernel//bpf/dump.c
95
96 int bpf_dump_query(const union bpf_attr *attr, union bpf_attr __user *uattr)
97 {
98 struct bpf_dump_info __user *ubpf_dinfo;
99 struct bpfdump_target_info *tinfo;
100 struct dumper_inode_info *i_info;
101 struct bpf_dump_info bpf_dinfo;
102 const char *prog_ctx_type_name;
103 void * __user tname_buf;
104 u32 tname_len, info_len;
105 struct file *filp;
106 struct fd qfd;
107 int err = 0;
108
109 qfd = fdget(attr->info.dump_query_fd);
110 filp = qfd.file;
111 if (!filp)
112 return -EBADF;
113
114 if (filp->f_op != &bpf_dumper_ops &&
115 filp->f_inode->i_op != &bpfdump_dir_iops) {
116 err = -EINVAL;
117 goto done;
118 }
119
120 info_len = attr->info.info_len;
121 ubpf_dinfo = u64_to_user_ptr(attr->info.info);
122 err = bpf_check_uarg_tail_zero(ubpf_dinfo, sizeof(bpf_dinfo),
123 info_len);
124 if (err)
125 goto done;
126 info_len = min_t(u32, sizeof(bpf_dinfo), info_len);
127
128 memset(&bpf_dinfo, 0, sizeof(bpf_dinfo));
129 if (copy_from_user(&bpf_dinfo, ubpf_dinfo, info_len)) {
130 err = -EFAULT;
131 goto done;
132 }
133
134 /* copy prog_id for dumpers */
135 if (filp->f_op == &bpf_dumper_ops) {
136 i_info = filp->f_inode->i_private;
137 bpf_dinfo.prog_id = i_info->prog->aux->id;
138 tinfo = i_info->tinfo;
139 } else {
140 tinfo = filp->f_inode->i_private;
141 }
142
143 prog_ctx_type_name = tinfo->prog_ctx_type_name;
144
145 tname_len = strlen(prog_ctx_type_name) + 1;
146 if (bpf_dinfo.type_name_buf_len < tname_len) {
147 err = -ENOSPC;
148 goto done;
149 }
150
151 /* copy prog_ctx_type_name */
152 tname_buf = u64_to_user_ptr(bpf_dinfo.prog_ctx_type_name);
153 if (copy_to_user(tname_buf, prog_ctx_type_name, tname_len)) {
154 err = -EFAULT;
155 goto done;
156 }
157
158 /* copy potentially updated bpf_dinfo and info_len */
159 if (copy_to_user(ubpf_dinfo, &bpf_dinfo, info_len) ||
160 put_user(info_len, &uattr->info.info_len))
161 return -EFAULT;
162
163 done:
164 fdput(qfd);
165 return err;
166 }
167
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org