From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7400590449792501902==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH RFC bpf-next v2 3/5] bpf: cgroup_view iter Date: Wed, 02 Feb 2022 09:17:41 +0800 Message-ID: <202202020906.kAc8RBeZ-lkp@intel.com> In-Reply-To: <20220201205534.1962784-4-haoluo@google.com> List-Id: --===============7400590449792501902== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Hao, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Hao-Luo/Extend-cgroup-inte= rface-with-bpf/20220202-045743 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git ma= ster config: m68k-defconfig (https://download.01.org/0day-ci/archive/20220202/20= 2202020906.kAc8RBeZ-lkp(a)intel.com/config) compiler: m68k-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/717a4c31e5bc20e5c7abf8c78= a8c434fb15788a3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Hao-Luo/Extend-cgroup-interface-wi= th-bpf/20220202-045743 git checkout 717a4c31e5bc20e5c7abf8c78a8c434fb15788a3 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dm68k SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): kernel/bpf/cgroup_view_iter.c: In function 'cgroup_view_seq_start': >> kernel/bpf/cgroup_view_iter.c:32:25: error: implicit declaration of func= tion 'cgroup_tryget'; did you mean 'cgroup_bpf_get'? [-Werror=3Dimplicit-fu= nction-declaration] 32 | if (!cgroup || !cgroup_tryget(cgroup)) | ^~~~~~~~~~~~~ | cgroup_bpf_get kernel/bpf/cgroup_view_iter.c: In function 'cgroup_view_seq_stop': >> kernel/bpf/cgroup_view_iter.c:77:17: error: implicit declaration of func= tion 'cgroup_put'; did you mean 'cgroup_psi'? [-Werror=3Dimplicit-function-= declaration] 77 | cgroup_put(v); | ^~~~~~~~~~ | cgroup_psi cc1: some warnings being treated as errors vim +32 kernel/bpf/cgroup_view_iter.c 11 = 12 static void *cgroup_view_seq_start(struct seq_file *seq, loff_t *pos) 13 { 14 struct bpf_dir_tag *tag; 15 struct kernfs_node *kn; 16 struct cgroup *cgroup; 17 struct inode *dir; 18 = 19 /* Only one session is supported. */ 20 if (*pos > 0) 21 return NULL; 22 = 23 dir =3D d_inode(seq->file->f_path.dentry->d_parent); 24 tag =3D dir->i_private; 25 if (!tag) 26 return NULL; 27 = 28 kn =3D tag->private; 29 = 30 rcu_read_lock(); 31 cgroup =3D rcu_dereference(*(void __rcu __force **)&kn->priv); > 32 if (!cgroup || !cgroup_tryget(cgroup)) 33 cgroup =3D NULL; 34 rcu_read_unlock(); 35 = 36 if (!cgroup) 37 return NULL; 38 = 39 if (*pos =3D=3D 0) 40 ++*pos; 41 return cgroup; 42 } 43 = 44 static void *cgroup_view_seq_next(struct seq_file *seq, void *v, lof= f_t *pos) 45 { 46 ++*pos; 47 return NULL; 48 } 49 = 50 struct bpf_iter__cgroup_view { 51 __bpf_md_ptr(struct bpf_iter_meta *, meta); 52 __bpf_md_ptr(struct cgroup *, cgroup); 53 }; 54 = 55 DEFINE_BPF_ITER_FUNC(cgroup_view, struct bpf_iter_meta *meta, struct= cgroup *cgroup) 56 = 57 static int cgroup_view_seq_show(struct seq_file *seq, void *v) 58 { 59 struct bpf_iter__cgroup_view ctx; 60 struct bpf_iter_meta meta; 61 struct bpf_prog *prog; 62 int ret =3D 0; 63 = 64 ctx.meta =3D &meta; 65 ctx.cgroup =3D v; 66 meta.seq =3D seq; 67 prog =3D bpf_iter_get_info(&meta, false); 68 if (prog) 69 ret =3D bpf_iter_run_prog(prog, &ctx); 70 = 71 return ret; 72 } 73 = 74 static void cgroup_view_seq_stop(struct seq_file *seq, void *v) 75 { 76 if (v) > 77 cgroup_put(v); 78 } 79 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============7400590449792501902==--