From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2306AC19437 for ; Tue, 8 Dec 2020 20:36:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE15323AA8 for ; Tue, 8 Dec 2020 20:36:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731462AbgLHUgE (ORCPT ); Tue, 8 Dec 2020 15:36:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731451AbgLHUgE (ORCPT ); Tue, 8 Dec 2020 15:36:04 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF82DC0613D6; Tue, 8 Dec 2020 12:35:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=IxUjidxYoQWIWw+OSbuqWgs3S+ci7dg8LpOu70b8znU=; b=sjnn01VEYfQi5OpNsK+GClHuGB mcfYSiXC/rOeuiwzGaglu2Q15aEl8wzoVAhdgo26Fgp/zpq30S3IcVl9Q1F+vT5MEQeHbzo14i8X6 wxFPOEDsIRmTaAZAEbtPnRVatVWkSnVagsS2+VoBH677rytezzLFubXxFwNe3oXN9CYi1O9ZAETQ+ hCEvvAaYxja1IOfoebLGeAtCBXZ8OulMlIThPumQ3RiolNlI+Ui2+6oGcn1k4qUdaSiRM2+cvdP1x 4TNC5ri1hJvAAe7MwQrHcZSxcX9BoqMjpv+VfVU4rLEuVj8Jh9/BsWkCrjYn4xIFpCr4+KGwbJGy7 JtJQP/2w==; Received: from [2601:1c0:6280:3f0::1494] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmjFe-0001sP-B7; Tue, 08 Dec 2020 20:06:22 +0000 Subject: Re: [PATCH bpf-next v3] bpf: Only provide bpf_sock_from_file with CONFIG_NET To: Florent Revest , bpf@vger.kernel.org Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kpsingh@chromium.org, kafai@fb.com, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot References: <20201208173623.1136863-1-revest@chromium.org> From: Randy Dunlap Message-ID: Date: Tue, 8 Dec 2020 12:06:16 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201208173623.1136863-1-revest@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/8/20 9:36 AM, Florent Revest wrote: > This moves the bpf_sock_from_file definition into net/core/filter.c > which only gets compiled with CONFIG_NET and also moves the helper proto > usage next to other tracing helpers that are conditional on CONFIG_NET. > > This avoids > ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file': > bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file' > When compiling a kernel with BPF and without NET. > > Reported-by: kernel test robot > Reported-by: Randy Dunlap > Acked-by: Randy Dunlap I would say that I didn't ack this version of the patch (hey, it's 3x the size of the v1/v2 patches), but I have just rebuilt with v3, so the Ack is OK. :) > Signed-off-by: Florent Revest > --- > include/linux/bpf.h | 1 + > kernel/trace/bpf_trace.c | 22 ++-------------------- > net/core/filter.c | 18 ++++++++++++++++++ > 3 files changed, 21 insertions(+), 20 deletions(-) -- ~Randy