From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET Date: Fri, 03 Nov 2017 14:20:41 +0900 (KST) Message-ID: <20171103.142041.432905243636214188.davem@davemloft.net> References: <20171102110558.2746221-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: ast@kernel.org, daniel@iogearbox.net, ecree@solarflare.com, john.fastabend@gmail.com, jakub.kicinski@netronome.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: arnd@arndb.de Return-path: In-Reply-To: <20171102110558.2746221-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Arnd Bergmann Date: Thu, 2 Nov 2017 12:05:51 +0100 > I ran into this link error with the latest net-next plus linux-next > trees when networking is disabled: > > kernel/bpf/verifier.o:(.rodata+0x2958): undefined reference to `tc_cls_act_analyzer_ops' > kernel/bpf/verifier.o:(.rodata+0x2970): undefined reference to `xdp_analyzer_ops' > > It seems that the code was written to deal with varying contents of > the arrray, but the actual #ifdef was missing. Both tc_cls_act_analyzer_ops > and xdp_analyzer_ops are defined in the core networking code, so adding > a check for CONFIG_NET seems appropriate here, and I've verified this with > many randconfig builds > > Fixes: 4f9218aaf8a4 ("bpf: move knowledge about post-translation offsets out of verifier") > Signed-off-by: Arnd Bergmann Applied.