Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7151524ybi; Mon, 8 Jul 2019 15:41:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTfDcUnh5bMrCOurVSUHaF7WbO13acBguzFJirf1zHVWepk/UH/FgaRCPjrRfyYICDEsTN X-Received: by 2002:a63:f941:: with SMTP id q1mr26839159pgk.350.1562625666920; Mon, 08 Jul 2019 15:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625666; cv=none; d=google.com; s=arc-20160816; b=tl/ShyjJwn2BnxikkOkQ7dDi8HQStXBNLIcmbGjslxCFotmXXqrpYtCbF/V+j70v5D AkS92JhZVQw6E6hdPJWYqS/WWK9O5LWn8hfuH3o1L0SaOtmP4OWa5JwZpqFBaBTcCXP5 gWoiGNbwOuLF0Lf4dBscAZoI6mSNmNEYeixPkg22dJjTUXEUtb2YOWop5BdDdwL/7l0v rkxLFOVuO7rYXADZPqBDQkqADmnjnzqT4jwpsAoCnY0dQJYM1AxNB+BrnySkXSEpB/uo D3hwo4lfN7MkwP+F6OcGJRVST5lMqNzWF5kMTjlnj/H/gSGBRpDRzTnid5fNavgxpgM+ UjkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YAhwy5zvqS7PKebwcScFyERg37T9nFHCIOol4Z8Z7G4=; b=W9GnA2tdNtRazmQsUgIRUbYWXBhP6vcr01DxVQUYjDaPZqyymOnvciFSsWIygq2z6r 2AX8OjH5kLXiMz3uIDiSMcYKUeDsGcg4lVMeedBj4XAk/LQeN2vTo5u5q1BIdD/PlMXh iUYPc4SsTwKMyaXWtZy0eao8fUYUhcRnLvY+30AMsVDxV/BLzTMRjBO1eWPE4UkcH0Mh zbSljpTtBpvHuJeU2QwDyGuV36e4Nl6+qAtSOAWAjUwb0yRnFdeGXW5qu3YFV06WI5IM K2pMxszBfrXvmwcAFmenefZS1V7uVjnBS9ylSwOj9e3a4PLlCGyMW/xyWbsVxXVYd49a fJAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q187si19266613pga.220.2019.07.08.15.40.52; Mon, 08 Jul 2019 15:41:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391048AbfGHPlX (ORCPT + 99 others); Mon, 8 Jul 2019 11:41:23 -0400 Received: from www62.your-server.de ([213.133.104.62]:45366 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388894AbfGHP0s (ORCPT ); Mon, 8 Jul 2019 11:26:48 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1hkVXP-0000jC-V5; Mon, 08 Jul 2019 17:26:44 +0200 Received: from [178.193.45.231] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hkVXP-000CEe-Mh; Mon, 08 Jul 2019 17:26:43 +0200 Subject: Re: [PATCH net-next 1/2] bpf: skip sockopt hooks without CONFIG_NET To: Yonghong Song , Arnd Bergmann , Alexei Starovoitov Cc: Andrii Nakryiko , Martin Lau , Stanislav Fomichev , Song Liu , Mauricio Vasquez B , Roman Gushchin , Matt Mullins , Willem de Bruijn , Andrey Ignatov , "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20190708125733.3944836-1-arnd@arndb.de> <0e7cf1b5-579f-5fcd-0966-8760148b00de@fb.com> From: Daniel Borkmann Message-ID: Date: Mon, 8 Jul 2019 17:26:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <0e7cf1b5-579f-5fcd-0966-8760148b00de@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.3/25504/Mon Jul 8 10:05:57 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/08/2019 05:06 PM, Yonghong Song wrote: > On 7/8/19 5:57 AM, Arnd Bergmann wrote: >> When CONFIG_NET is disabled, we get a link error: >> >> kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_setsockopt': >> cgroup.c:(.text+0x3010): undefined reference to `lock_sock_nested' >> cgroup.c:(.text+0x3258): undefined reference to `release_sock' >> kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_getsockopt': >> cgroup.c:(.text+0x3568): undefined reference to `lock_sock_nested' >> cgroup.c:(.text+0x3870): undefined reference to `release_sock' >> kernel/bpf/cgroup.o: In function `cg_sockopt_func_proto': >> cgroup.c:(.text+0x41d8): undefined reference to `bpf_sk_storage_delete_proto' >> >> None of this code is useful in this configuration anyway, so we can >> simply hide it in an appropriate #ifdef. >> >> Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") >> Signed-off-by: Arnd Bergmann > > FYI. > > There is already a patch to fix the same issue, > https://lore.kernel.org/bpf/e9e489fe-feec-a211-82aa-5df0c6a308d1@huawei.com/T/#t > > which has been acked and not merged yet. Done now, and I've also applied patch 2/2 from here, thanks.