From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934643AbdKBWcq (ORCPT ); Thu, 2 Nov 2017 18:32:46 -0400 Received: from www62.your-server.de ([213.133.104.62]:38325 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932201AbdKBWcp (ORCPT ); Thu, 2 Nov 2017 18:32:45 -0400 Message-ID: <59FB9D06.5010400@iogearbox.net> Date: Thu, 02 Nov 2017 23:32:38 +0100 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Arnd Bergmann , Alexei Starovoitov CC: "David S. Miller" , Edward Cree , John Fastabend , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET References: <20171102110558.2746221-1-arnd@arndb.de> In-Reply-To: <20171102110558.2746221-1-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/2017 12:05 PM, Arnd Bergmann wrote: > 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 Acked-by: Daniel Borkmann