From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933678AbdKBRzg (ORCPT ); Thu, 2 Nov 2017 13:55:36 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:47176 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932716AbdKBRze (ORCPT ); Thu, 2 Nov 2017 13:55:34 -0400 X-Google-Smtp-Source: ABhQp+QSlmOADlCrOXOKEsiFb3WIL0EVdpDfONXJul1mfsvCpmqPCV1nbPGtSGXLQKjbUPgeFFn0Dg== Date: Thu, 2 Nov 2017 10:55:30 -0700 From: Jakub Kicinski To: Arnd Bergmann Cc: Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Edward Cree , John Fastabend , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] [net-next] bpf: fix link error without CONFIG_NET Message-ID: <20171102105530.1997dd91@cakuba.netronome.com> In-Reply-To: <20171102110558.2746221-1-arnd@arndb.de> References: <20171102110558.2746221-1-arnd@arndb.de> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Nov 2017 12:05:51 +0100, 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 Thanks Arnd! I was hoping to nuke this code before build bots catch up to me, didn't work out :)