Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752922AbdLESHA (ORCPT ); Tue, 5 Dec 2017 13:07:00 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:42216 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752126AbdLESG4 (ORCPT ); Tue, 5 Dec 2017 13:06:56 -0500 Date: Tue, 5 Dec 2017 18:06:50 +0000 From: Al Viro To: Abdul Haleem Cc: linuxppc-dev , linux-next , linux-kernel , Stephen Rothwell , mpe , sachinp Subject: Re: [linux-next][41e83b9][gcc 4.8.5] make modules fail at net/netfilter/xt_bpf.ko Message-ID: <20171205180650.GV21978@ZenIV.linux.org.uk> References: <1512484991.13113.11.camel@abdul> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1512484991.13113.11.camel@abdul> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1815 Lines: 58 On Tue, Dec 05, 2017 at 08:13:11PM +0530, Abdul Haleem wrote: > Hi Al Viro, > > Today's next kernel build failed with commit 41e83b9: fix "netfilter: > xt_bpf: Fix XT_BPF_MODE_FD_PINNED > > Machine Type: Power 7 > kernel version: 4.15.0-rc2-next-20171204 > kernel config: attached > test: 'make modules' > > ERROR: ".bpf_prog_get_type_path" [net/netfilter/xt_bpf.ko] undefined! > > Kernel built fine when bad commit is reverted. In the same commit there's +EXPORT_SYMBOL(bpf_prog_get_type_path); so I really wonder WTF is going on... Oh, I see. !BPF_SYSCALL and NETFILTER_XT_MATCH_BPF in .config triggers that. Incremental (to be folded into the commit in question) follows: diff --git a/include/linux/bpf.h b/include/linux/bpf.h index a7000e4775e7..571450f98006 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -419,6 +419,8 @@ static inline int bpf_map_attr_numa_node(const union bpf_attr *attr) attr->numa_node : NUMA_NO_NODE; } +struct bpf_prog *bpf_prog_get_type_path(const char *name, enum bpf_prog_type type); + #else /* !CONFIG_BPF_SYSCALL */ static inline struct bpf_prog *bpf_prog_get(u32 ufd) { @@ -506,6 +508,12 @@ static inline int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, { return 0; } + +static inline struct bpf_prog *bpf_prog_get_type_path(const char *name, + enum bpf_prog_type type) +{ + return -EOPNOTSUPP; +} #endif /* CONFIG_BPF_SYSCALL */ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, @@ -514,7 +522,6 @@ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, return bpf_prog_get_type_dev(ufd, type, false); } -struct bpf_prog *bpf_prog_get_type_path(const char *name, enum bpf_prog_type type); bool bpf_prog_get_ok(struct bpf_prog *, enum bpf_prog_type *, bool); int bpf_prog_offload_compile(struct bpf_prog *prog);