Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3475508pxu; Tue, 8 Dec 2020 13:05:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4zTT3QqpEgU9EWIFG+S4yQZDWy/TIIkf6OjamMFySnARla4GoouAu8nH3Ed6TzPo0dt6b X-Received: by 2002:a17:906:3c04:: with SMTP id h4mr24163744ejg.220.1607461552983; Tue, 08 Dec 2020 13:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607461552; cv=none; d=google.com; s=arc-20160816; b=dlsCKc4csWbVvXJe195vxK16ZhT0Mz3+lvy7p8dPHNfne9cSHkRyOAt689yFgBYX9/ zWTp8+8lraGRtKBOhu0U8XzDZyruZ16gRbANAl6rz7Aw+XmT4k/IIqafCjYXMlHWOXOb FzbbimzsRC1pk7uJKs96z3CHkxUe4JQDGuk7cO1S9KF21CQr/tVZ0yUhSZD3XPja6n/8 OYmSUbpx09BQLWIv5c1d+YpEteM5UT9IHup07gq1Wo4+9XdnJTrIGRv83ep2OKz41Ufn pHZ900OmZhMlvJXRxIGtIr2mgJnFddymZIJKWdfjYdQNePJhhLMEamSWuAYKS8khc28V QISA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=IxUjidxYoQWIWw+OSbuqWgs3S+ci7dg8LpOu70b8znU=; b=w+qFkpMCy4NGfxG5DuIdgzXCTXzG8/vyeBAGw4oqZOxv6TtbXSxqBPgWLzgbB87TMM 3yeFS38h9uK+YFRisR8oL4LZa9GouP1xNW0BNxkWw7Jof9PZJdgiApcrqpic5LhwW4w7 T9xoC2mfOj7zYIQoGSMfm3y1rI1Z0uWlamvq/XBd4aO0Pvrh9pz5Ujo/nE6rjzJdY/n0 NNgqgOYlQr4bIde60YZtjI0gAhTQe/LJbxROt+Z66cA1GK09cGN0xLK2Re4/dzCXQoxb N9I+PwqzGkI7bYMy9PLNR4wBAhpcxKApqAKy++R/ZXWlw2XZd2yzklUoD30lFrtbP/v5 Hgxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=sjnn01VE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si10807800edx.3.2020.12.08.13.05.28; Tue, 08 Dec 2020 13:05:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=sjnn01VE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731457AbgLHUgE (ORCPT + 99 others); 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