From: kbuild test robot <lkp@intel.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: kbuild-all@lists.01.org, bpf@vger.kernel.org,
netdev@vger.kernel.org, ast@fb.com, daniel@iogearbox.net
Subject: Re: [PATCH bpf-next 4/6] bpf: implement bpf_prog replacement for an active bpf_cgroup_link
Date: Sat, 21 Mar 2020 09:28:08 +0800 [thread overview]
Message-ID: <202003210931.StdVFwZ6%lkp@intel.com> (raw)
In-Reply-To: <20200320203615.1519013-5-andriin@fb.com>
[-- Attachment #1: Type: text/plain, Size: 5416 bytes --]
Hi Andrii,
I love your patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
[cannot apply to bpf/master cgroup/for-next v5.6-rc6 next-20200320]
[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/Andrii-Nakryiko/Add-support-for-cgroup-bpf_link/20200321-045848
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: mips-64r6el_defconfig (attached as .config)
compiler: mips64el-linux-gcc (GCC) 5.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=5.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11:0,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:9,
from kernel/bpf/syscall.c:4:
kernel/bpf/syscall.c: In function 'link_update':
include/linux/kernel.h:994:51: error: dereferencing pointer to incomplete type 'struct bpf_cgroup_link'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/kernel.h:994:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/kernel.h:994:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
kernel/bpf/syscall.c:3612:13: note: in expansion of macro 'container_of'
cg_link = container_of(link, struct bpf_cgroup_link, link);
^
In file included from <command-line>:0:0:
>> kernel/bpf/syscall.c:3612:39: error: invalid use of undefined type 'struct bpf_cgroup_link'
cg_link = container_of(link, struct bpf_cgroup_link, link);
^
include/linux/compiler_types.h:129:54: note: in definition of macro '__compiler_offsetof'
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
^
include/linux/kernel.h:997:21: note: in expansion of macro 'offsetof'
((type *)(__mptr - offsetof(type, member))); })
^
kernel/bpf/syscall.c:3612:13: note: in expansion of macro 'container_of'
cg_link = container_of(link, struct bpf_cgroup_link, link);
^
>> kernel/bpf/syscall.c:3618:9: error: implicit declaration of function 'cgroup_bpf_replace' [-Werror=implicit-function-declaration]
ret = cgroup_bpf_replace(cg_link->cgroup, cg_link,
^
cc1: some warnings being treated as errors
vim +3612 kernel/bpf/syscall.c
3576
3577 static int link_update(union bpf_attr *attr)
3578 {
3579 struct bpf_prog *old_prog = NULL, *new_prog;
3580 enum bpf_prog_type ptype;
3581 struct bpf_link *link;
3582 u32 flags;
3583 int ret;
3584
3585 if (CHECK_ATTR(BPF_LINK_UPDATE))
3586 return -EINVAL;
3587
3588 flags = attr->link_update.flags;
3589 if (flags & ~BPF_F_REPLACE)
3590 return -EINVAL;
3591
3592 link = bpf_link_get_from_fd(attr->link_update.link_fd);
3593 if (IS_ERR(link))
3594 return PTR_ERR(link);
3595
3596 new_prog = bpf_prog_get(attr->link_update.new_prog_fd);
3597 if (IS_ERR(new_prog))
3598 return PTR_ERR(new_prog);
3599
3600 if (flags & BPF_F_REPLACE) {
3601 old_prog = bpf_prog_get(attr->link_update.old_prog_fd);
3602 if (IS_ERR(old_prog)) {
3603 ret = PTR_ERR(old_prog);
3604 old_prog = NULL;
3605 goto out_put_progs;
3606 }
3607 }
3608
3609 if (link->ops == &bpf_cgroup_link_lops) {
3610 struct bpf_cgroup_link *cg_link;
3611
> 3612 cg_link = container_of(link, struct bpf_cgroup_link, link);
3613 ptype = attach_type_to_prog_type(cg_link->type);
3614 if (ptype != new_prog->type) {
3615 ret = -EINVAL;
3616 goto out_put_progs;
3617 }
> 3618 ret = cgroup_bpf_replace(cg_link->cgroup, cg_link,
3619 old_prog, new_prog);
3620 } else {
3621 ret = -EINVAL;
3622 }
3623
3624 out_put_progs:
3625 if (old_prog)
3626 bpf_prog_put(old_prog);
3627 if (ret)
3628 bpf_prog_put(new_prog);
3629 return ret;
3630 }
3631
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 20603 bytes --]
next prev parent reply other threads:[~2020-03-21 1:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 20:36 [PATCH bpf-next 0/6] Add support for cgroup bpf_link Andrii Nakryiko
2020-03-20 20:36 ` [PATCH bpf-next 1/6] bpf: factor out cgroup storages operations Andrii Nakryiko
2020-03-20 20:36 ` [PATCH bpf-next 2/6] bpf: factor out attach_type to prog_type mapping for attach/detach Andrii Nakryiko
2020-03-20 20:36 ` [PATCH bpf-next 3/6] bpf: implement bpf_link-based cgroup BPF program attachment Andrii Nakryiko
2020-03-20 21:33 ` Stanislav Fomichev
2020-03-20 21:47 ` Andrii Nakryiko
2020-03-20 23:46 ` [Potential Spoof] " Andrey Ignatov
2020-03-21 0:19 ` Andrii Nakryiko
2020-03-23 18:03 ` Andrii Nakryiko
2020-03-20 20:36 ` [PATCH bpf-next 4/6] bpf: implement bpf_prog replacement for an active bpf_cgroup_link Andrii Nakryiko
2020-03-21 0:33 ` kbuild test robot
2020-03-21 0:58 ` Andrii Nakryiko
2020-03-21 1:28 ` kbuild test robot [this message]
2020-03-23 10:58 ` Toke Høiland-Jørgensen
2020-03-23 17:55 ` Andrii Nakryiko
2020-03-23 19:29 ` Toke Høiland-Jørgensen
2020-03-20 20:36 ` [PATCH bpf-next 5/6] libbpf: add support for bpf_link-based cgroup attachment Andrii Nakryiko
2020-03-23 11:02 ` Toke Høiland-Jørgensen
2020-03-23 17:58 ` Andrii Nakryiko
2020-03-23 19:31 ` Toke Høiland-Jørgensen
2020-03-24 23:05 ` Andrii Nakryiko
2020-03-20 20:36 ` [PATCH bpf-next 6/6] selftests/bpf: test FD-based " Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202003210931.StdVFwZ6%lkp@intel.com \
--to=lkp@intel.com \
--cc=andriin@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kbuild-all@lists.01.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).