From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BB15C433E4 for ; Tue, 28 Jul 2020 19:07:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C61820809 for ; Tue, 28 Jul 2020 19:07:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rzHKu3oi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729278AbgG1THJ (ORCPT ); Tue, 28 Jul 2020 15:07:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729168AbgG1THJ (ORCPT ); Tue, 28 Jul 2020 15:07:09 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CDDCC061794; Tue, 28 Jul 2020 12:07:09 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id 11so19813321qkn.2; Tue, 28 Jul 2020 12:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a4k23v6u+Ynb9I+UZreRULUB5erdIyY4Rw8+D/r4YBg=; b=rzHKu3oiRxCv2rWjVM5ZT2ZfECTv55bKcEn0gOGRiBmvtND8mTEbnNMiLNxSDTS889 VTBm52iBupzS6bnS07qgGUIQZJVUZYlZZFijnyrFr2eJl8fe0U+oJFUAU57Jm7FrnbJc iegIINWy6pTqFXKEat61aTh++Ah5z6gstdnrNic4u0Da3dV80oTEsqLB23Y7Kd3PT7CY zgRwvLoi3g1kQZnnrhiiDUBCR2K/moIZYx+Rp4AEvP3eBEVliFOqvDaCUFIfcwQkkNoe Q6noOUBjW1vNKAuq9qGfWIpeJfaaxsPy9lvdUiXnu0eHOVqgXda++KZ9b2aIWQnuB2ur 7WTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a4k23v6u+Ynb9I+UZreRULUB5erdIyY4Rw8+D/r4YBg=; b=hicpyvuE0AvYDtysY6403lxtpdSTYvaIATpewSdtuGvxrcOUzTB1KvumHqZ8PBdLGR KSlx/ctD0UIqh2lhdCuEseRFqCVnd2dd03QwHKuhtoGO0Df0XgW+Dt2dlnZ2Id7Rzg9+ lraC1U8nIBEBUaSsU0fUYtVlev+Pl4Gf9RUzq+TOzaWp3xSpA9XEIpIKjfUat6MHdD84 QNqBK6azwWOWT+RQbN7qJCxSQvyaK6Al9tAbtpfSwmKMfqIKqOHGYcZlZxfj7ZcJf8HA J73nyp9rMj+EUHXykgqLcK2FLQgVjs7KxXlvZg6lSSbLb1p75UDZa93Yxu8G3AMVxu9m IGOQ== X-Gm-Message-State: AOAM532O4UVczxNxnObDsaLM2UyMJwMI6JWHsy4uDCRkQb0COqwRuuNB H1Z2tEHZn4CRYfs9gwvqu+ZcbyDECiZ9xgv2JeQ= X-Google-Smtp-Source: ABdhPJynywuwc/59HutV2Wmn/jRKU1gHMVeo7tUzFSE/COhAoW50C/APPJJa6wl5xuMZcvDGkNw4DcUaMD3g9MzD+rA= X-Received: by 2002:a05:620a:4c:: with SMTP id t12mr3913142qkt.449.1595963228377; Tue, 28 Jul 2020 12:07:08 -0700 (PDT) MIME-Version: 1.0 References: <20200727232346.0106c375@canb.auug.org.au> In-Reply-To: From: Andrii Nakryiko Date: Tue, 28 Jul 2020 12:06:57 -0700 Message-ID: Subject: Re: linux-next: Tree for Jul 27 (kernel/bpf/syscall.o) To: Randy Dunlap Cc: Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , bpf , "netdev@vger.kernel.org" , Alexei Starovoitov , Daniel Borkmann Content-Type: text/plain; charset="UTF-8" Sender: linux-next-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Mon, Jul 27, 2020 at 11:01 PM Randy Dunlap wrote: > > On 7/27/20 10:48 PM, Andrii Nakryiko wrote: > > On Mon, Jul 27, 2020 at 11:58 AM Randy Dunlap 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; >