From patchwork Mon Jun 6 04:56:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Shen Lim X-Patchwork-Id: 9157229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1D2E60467 for ; Mon, 6 Jun 2016 04:57:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3C9B252D5 for ; Mon, 6 Jun 2016 04:57:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B538F27D45; Mon, 6 Jun 2016 04:57:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3A99C252D5 for ; Mon, 6 Jun 2016 04:57:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b9maP-0005QG-2r; Mon, 06 Jun 2016 04:56:25 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b9maM-0005Jn-8V for linux-arm-kernel@lists.infradead.org; Mon, 06 Jun 2016 04:56:23 +0000 Received: by mail-pf0-x242.google.com with SMTP id z187so2689193pfz.2 for ; Sun, 05 Jun 2016 21:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fo6+H/CKyixlukrpk+YZ1wppT5lZwZpNA2rGnM4tYF8=; b=kCKarFzAPaAf5Smp5pldHK/Gaa6JJah7MNaHw6nA4LgJMBCPSZsyuy+Z5oBXsPHAZD Wl3eGY0VHirFp9y/gFJ7X3sbci1Hs5xJZocCIbq23FOtYEbpfg3D1vmsb6JKhsGBn2Ox 72EGgrw7mQJSelOHPAJK99ppc8aBIV1HQMW8EYcFyLKwcUvHUD8asVdQsLqxPKUov/oR V7KKvSc+UoiWAwd4aM1HGlBbPD6138tMUmQZlJWYZ6giROVH2z/iP4PpzeNlr9ZsRDnI oDRTO77ixnB3WZyxYd7W5ZdvSOimC36qbIB3hSPvsPU8+fTIqdl1zo6MV9J1xZGy/iXe 8I/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fo6+H/CKyixlukrpk+YZ1wppT5lZwZpNA2rGnM4tYF8=; b=aFQ45qUhf5RPA1+Z+/JzDpjvGCzy5EtQ2pXb5R6UlL1mQCZxhyG7TIhsW2vmX578ea zWmkseaQxzHvyO8bJ5QlW2QcrZt1a8g5FTw/NG44Ke0u9K5XP92jLXHbNEciM1oHE2g4 4hlTPUHrc+dSKoOiwqKU1jU7hyJQl92WOHwqItwHEELhSzkNp+zvS5Uc6tt1MPOCst5M C7k1BNmhp07y0eLoq6tTTqd4x+f8ym7j23Zz2Q9MwKZHPno9afIOZLXnNVPEjkmicKVE +14KrWZkZPty37OMxNCPQXz9BGxS/AKt9JwBENtfXStXVfCgU9Yo0jR0RouRuKa+zqyn rcVw== X-Gm-Message-State: ALyK8tJZixSNyENYGX9BS6b+lCT68PY+9wM7sz9b1mVlJYOxT1a4lvRcymeak16/WUH1ErP60sxEQTS9xfvqbw== X-Received: by 10.98.96.67 with SMTP id u64mr23362098pfb.152.1465188961163; Sun, 05 Jun 2016 21:56:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.67.14 with HTTP; Sun, 5 Jun 2016 21:56:00 -0700 (PDT) In-Reply-To: <5753DA61.3000505@iogearbox.net> References: <201606050700.BLJUHUk2%fengguang.wu@intel.com> <5753DA61.3000505@iogearbox.net> From: Z Lim Date: Sun, 5 Jun 2016 21:56:00 -0700 Message-ID: Subject: Re: [PATCH net-next 1/3] arm64: bpf: implement bpf_tail_call() helper To: Daniel Borkmann X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160605_215622_370649_298742AC X-CRM114-Status: GOOD ( 16.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yang Shi , kbuild test robot , Catalin Marinas , Will Deacon , Alexei Starovoitov , LKML , kbuild-all@01.org, Network Development , "David S. Miller" , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Daniel, On Sun, Jun 5, 2016 at 12:53 AM, Daniel Borkmann wrote: > On 06/05/2016 01:46 AM, kbuild test robot wrote: >> >> Hi, >> >> [auto build test ERROR on net-next/master] >> >> url: >> https://github.com/0day-ci/linux/commits/Zi-Shen-Lim/arm64-bpf-implement-bpf_tail_call-helper/20160605-060435 >> config: arm64-defconfig (attached as .config) >> compiler: aarch64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205 >> reproduce: >> wget >> https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross >> -O ~/bin/make.cross >> chmod +x ~/bin/make.cross >> # save the attached .config to linux build tree >> make.cross ARCH=arm64 >> >> All errors (new ones prefixed by >>): >> >> In file included from arch/arm64/net/bpf_jit_comp.c:21:0: >> include/linux/bpf.h: In function 'bpf_prog_get': >>>> >>>> include/linux/bpf.h:235:9: error: implicit declaration of function >>>> 'ERR_PTR' [-Werror=implicit-function-declaration] >> >> return ERR_PTR(-EOPNOTSUPP); >> ^ >> include/linux/bpf.h:235:9: warning: return makes pointer from integer >> without a cast [-Wint-conversion] >> In file included from include/linux/rwsem.h:17:0, >> from include/linux/mm_types.h:10, >> from include/linux/sched.h:27, >> from arch/arm64/include/asm/compat.h:25, >> from arch/arm64/include/asm/stat.h:23, >> from include/linux/stat.h:5, >> from include/linux/compat.h:12, >> from include/linux/filter.h:10, >> from arch/arm64/net/bpf_jit_comp.c:22: >> include/linux/err.h: At top level: >>>> >>>> include/linux/err.h:23:35: error: conflicting types for 'ERR_PTR' >> >> static inline void * __must_check ERR_PTR(long error) >> ^ >> In file included from arch/arm64/net/bpf_jit_comp.c:21:0: >> include/linux/bpf.h:235:9: note: previous implicit declaration of >> 'ERR_PTR' was here >> return ERR_PTR(-EOPNOTSUPP); >> ^ >> cc1: some warnings being treated as errors > > > Looks like including linux/bpf.h at the very beginning causes issues when > bpf > syscall is disabled. We should probably just include linux/err.h from bpf.h. How about the attached patch? Fixes compilation error on build !CONFIG_BPF_SYSCALL. Also, should this patch be sent to net or net-next (along with this series)? Thanks, z Acked-by: Daniel Borkmann From 0633e3e528e11b09691fbf533ba7fdaf4c52f772 Mon Sep 17 00:00:00 2001 From: Zi Shen Lim Date: Sun, 5 Jun 2016 21:43:14 -0700 Subject: [PATCH] bpf: fix missing header inclusion Commit 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") introduced usage of ERR_PTR() in bpf_prog_get(), however did not include linux/err.h. Without this patch, when compiling arm64 BPF without CONFIG_BPF_SYSCALL: ... In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h: In function 'bpf_prog_get': include/linux/bpf.h:235:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration] return ERR_PTR(-EOPNOTSUPP); ^ include/linux/bpf.h:235:9: warning: return makes pointer from integer without a cast [-Wint-conversion] In file included from include/linux/rwsem.h:17:0, from include/linux/mm_types.h:10, from include/linux/sched.h:27, from arch/arm64/include/asm/compat.h:25, from arch/arm64/include/asm/stat.h:23, from include/linux/stat.h:5, from include/linux/compat.h:12, from include/linux/filter.h:10, from arch/arm64/net/bpf_jit_comp.c:22: include/linux/err.h: At top level: include/linux/err.h:23:35: error: conflicting types for 'ERR_PTR' static inline void * __must_check ERR_PTR(long error) ^ In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h:235:9: note: previous implicit declaration of 'ERR_PTR' was here return ERR_PTR(-EOPNOTSUPP); ^ ... Fixes: 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") Suggested-by: Daniel Borkmann Signed-off-by: Zi Shen Lim --- include/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 8ee27b8..1bcae82 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -11,6 +11,7 @@ #include #include #include +#include struct bpf_map; -- 1.9.1