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: 630632 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rNMqC2BzWz9t3p for ; Mon, 6 Jun 2016 14:56:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=kCKarFzA; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753202AbcFFE4E (ORCPT ); Mon, 6 Jun 2016 00:56:04 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33119 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752766AbcFFE4C (ORCPT ); Mon, 6 Jun 2016 00:56:02 -0400 Received: by mail-pf0-f195.google.com with SMTP id u67so892014pfu.0; 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=RRfCGxRK1ZLtP6N+fDmkT1HZfnChNlLNhISfT0N+RY2SZmHibO8KJpo+P/DAHNGsaA /dyy9K50YDDCBGJcD+OdCpovhnT+5kOZRPB3IzIeFZ5ll981WbWDzdYye1MWsv97nJIE y0R6EaZu7XQpLEXBonV3poc6ZftWQIF9COpKD8lGUDxCXEw2MCXaRvZxpwHosLgdE3r+ v8QKGLGh9kGD+nfIvkvjfWnmZoL/6Ppi3NwEA1pnWVQD2Z82TNZbdJWoGlzMJADsa4iH jFIZPdvZmRGV3WRc23hLVrfQ0CDucc36W69uAsRfqY0Z8ihqnfS/92GRFchPfh0OHjXQ wcVw== X-Gm-Message-State: ALyK8tJNlpPKwf/ZuKt/b2WsRZczNpClxCkEu5yja3he8M6JT11Pi382zVhO6CYFdzEW5mQUbeL8Rk59J8MLcw== 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 Cc: kbuild test robot , kbuild-all@01.org, "David S. Miller" , Catalin Marinas , Will Deacon , Yang Shi , Alexei Starovoitov , Network Development , "linux-arm-kernel@lists.infradead.org" , LKML Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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