Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7151262ybi; Mon, 8 Jul 2019 15:40:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAbxCwL9Xy6KB3lMQZxkx13Z12WojjMKkSV1uXMyYzlUghlDrXy0hFQgwFT8fFd59GyIKA X-Received: by 2002:a17:90a:7d09:: with SMTP id g9mr28087533pjl.38.1562625643586; Mon, 08 Jul 2019 15:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625643; cv=none; d=google.com; s=arc-20160816; b=k+rHIBdyH5LaSQAae1BEf7dzgOJ/0wQbbRMV53PxVbt0vu75vYki4nPxvhx2HKWilK tGbfs8Gihh/xUP68e785Y/u6TA9alo9COrmh1YKWAQG3FFcUTfLfnI2Zncthl7QJFLcW Zi828Mcjoqs/gPvHQu8AApnvAddEdqnhd8fpvgvJTFR4nwYvsEtu7unukH2X7cEDqKec dyhAutsm+HM4LjHwPSyd6Ot3yhXyON30fIrAyJ1TVtnP8lkrAMSFKUDLD9fsMplE7lH2 WSRZekz8vr6C0yM3zo6ZOx0UjUaKlXXC95DeWgw5MXHTvKEYmpCSHsermueS3VDfp5Ih 9glw== 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=8iH+p0aKOIo3hMRDIr0Dd4n18qOPYm4LgZfCTXzbY6U=; b=jmaMgh13C5DQjS5PSBBE2X90fmTK7Nj/I9BxcOt1X/iZvIST3h2SxGlbBkw+ATS6LZ MSZ3wT7LqLU/vsQMCV/AEVA/uabj9GwY6Gq7kHl5mae0EErG24sMoJS1L0lmdTI97M8v TvZCP/EOT+Zi7NE8hsKE5DocGwQDEzxFTrnF8I9qdGeNbTg0XKcFYz3aNz0n1siBPFbX posrn2DMpFO5i7XHeVuHoz4V8qpA8xEkyolY3cpigFFO/obYZuB822qoevPcsHDr11j8 1bxzZFBmLUUKqIgycfsPOYM/INLuearsdn5p47HlqsSmvgL9IO1lbnCn1f7k4fgYIs8C fpXw== 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 t4si19142213plb.188.2019.07.08.15.40.28; Mon, 08 Jul 2019 15:40:43 -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 S2391057AbfGHPln (ORCPT + 99 others); Mon, 8 Jul 2019 11:41:43 -0400 Received: from www62.your-server.de ([213.133.104.62]:45224 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388764AbfGHP0K (ORCPT ); Mon, 8 Jul 2019 11:26:10 -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 1hkVWm-0000hB-4N; Mon, 08 Jul 2019 17:26:04 +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 1hkVWl-0005gf-Te; Mon, 08 Jul 2019 17:26:03 +0200 Subject: Re: [PATCH v2 bpf-next] bpf: cgroup: Fix build error without CONFIG_NET To: YueHaibing , ast@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, sdf@google.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org References: <20190703082630.51104-1-yuehaibing@huawei.com> From: Daniel Borkmann Message-ID: <51277a61-c2a0-02c8-5ebe-00db1a222386@iogearbox.net> Date: Mon, 8 Jul 2019 17:26:02 +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: <20190703082630.51104-1-yuehaibing@huawei.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/03/2019 10:26 AM, YueHaibing wrote: > If CONFIG_NET is not set and CONFIG_CGROUP_BPF=y, > gcc building fails: > > kernel/bpf/cgroup.o: In function `cg_sockopt_func_proto': > cgroup.c:(.text+0x237e): undefined reference to `bpf_sk_storage_get_proto' > cgroup.c:(.text+0x2394): undefined reference to `bpf_sk_storage_delete_proto' > kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_getsockopt': > (.text+0x2a1f): undefined reference to `lock_sock_nested' > (.text+0x2ca2): undefined reference to `release_sock' > kernel/bpf/cgroup.o: In function `__cgroup_bpf_run_filter_setsockopt': > (.text+0x3006): undefined reference to `lock_sock_nested' > (.text+0x32bb): undefined reference to `release_sock' > > Reported-by: Hulk Robot > Suggested-by: Stanislav Fomichev > Fixes: 0d01da6afc54 ("bpf: implement getsockopt and setsockopt hooks") > Signed-off-by: YueHaibing Applied, thanks!