linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: linux-next: Tree for Jul 27 (kernel/bpf/syscall.o)
Date: Tue, 28 Jul 2020 12:06:57 -0700	[thread overview]
Message-ID: <CAEf4BzbVxJG4WBC10sW7N0OJ9HAZGK4WTCp2GQVF6+UzVSqkrA@mail.gmail.com> (raw)
In-Reply-To: <f5613a75-efcb-93e6-e139-e16b87b373f5@infradead.org>

On Mon, Jul 27, 2020 at 11:01 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 7/27/20 10:48 PM, Andrii Nakryiko wrote:
> > On Mon, Jul 27, 2020 at 11:58 AM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>
> >> On 7/27/20 6:23 AM, Stephen Rothwell wrote:
> >>> Hi all,
> >>>
> >>> Changes since 20200724:
> >>>
> >>
> >> on i386:
> >> when CONFIG_XPS is not set/enabled:
> >>
> >> ld: kernel/bpf/syscall.o: in function `__do_sys_bpf':
> >> syscall.c:(.text+0x4482): undefined reference to `bpf_xdp_link_attach'
> >>
> >
> > I can't repro this on x86-64 with CONFIG_XPS unset. Do you mind
> > sharing the exact config you've used?
>
> No problem. I see this on i386 or x86_64. I am attaching the x86_64
> randconfig file instead of the i386 one.
>
> > I see that kernel/bpf/syscall.c doesn't include linux/netdevice.h
> > directly, so something must be preventing netdevice.h to eventually
> > get to bpf/syscall.c, but instead of guessing on the fix, I'd like to
> > repro it first. Thanks!
>
> The build failure was causing me to see lots of builds failing, so I made
> a simple patch so that I could get past this issue.  My patch follows.
> Feel free to fix it any way you like.
>

I was confused for a while by CONFIG_XPS, as nothing really depends on
it. So it turned out the real dependency is CONFIG_NET, which is also
unset in your random config. I just sent a fix, thanks for reporting
and sharing the config!


> Thanks.
> ---
> ---
>  kernel/bpf/syscall.c |    4 ++++
>  1 file changed, 4 insertions(+)
>
> --- mmotm-2020-0727-1818.orig/kernel/bpf/syscall.c
> +++ mmotm-2020-0727-1818/kernel/bpf/syscall.c
> @@ -3924,7 +3924,11 @@ static int link_create(union bpf_attr *a
>                 ret = netns_bpf_link_create(attr, prog);
>                 break;
>         case BPF_PROG_TYPE_XDP:
> +#ifdef CONFIG_XPS
>                 ret = bpf_xdp_link_attach(attr, prog);
> +#else
> +               ret = -EINVAL;
> +#endif
>                 break;
>         default:
>                 ret = -EINVAL;
>

  reply	other threads:[~2020-07-28 19:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 13:23 linux-next: Tree for Jul 27 Stephen Rothwell
2020-07-27 16:49 ` linux-next: Tree for Jul 27 (drivers/net/phy/mdio-octeon.o) Randy Dunlap
2020-07-27 17:06 ` linux-next: Tree for Jul 27 (drivers/usb/dwc2/drd.c) Randy Dunlap
2020-07-27 17:28 ` linux-next: Tree for Jul 27 (kernel/bpf/syscall.o) Randy Dunlap
2020-07-28  5:48   ` Andrii Nakryiko
2020-07-28  6:00     ` Randy Dunlap
2020-07-28 19:06       ` Andrii Nakryiko [this message]
2020-07-28  0:49 ` linux-next: Tree for Jul 27 (drivers/gpu/drm/xlnx/zynqmp-dpsub) Randy Dunlap
2020-07-28 22:32   ` Laurent Pinchart
2020-07-28 22:52     ` Randy Dunlap

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=CAEf4BzbVxJG4WBC10sW7N0OJ9HAZGK4WTCp2GQVF6+UzVSqkrA@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /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).