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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 A12D9C63697 for ; Mon, 16 Nov 2020 21:24:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 46D8620DD4 for ; Mon, 16 Nov 2020 21:24:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="gag1Zu/O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727479AbgKPVYS (ORCPT ); Mon, 16 Nov 2020 16:24:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:55434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbgKPVYR (ORCPT ); Mon, 16 Nov 2020 16:24:17 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 79B8220A8B; Mon, 16 Nov 2020 21:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605561857; bh=3VnnvbQxkgfASwo/IG6GbeA05RjPoW7wuXX55oj4FDU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gag1Zu/ORHuCHgWwv+NvGvtK9SMbAuDQuCCkYwWURW/O5fvAraeWSGljpFBivRDFq m4oZBpreeRID81fgbwaJBLu2ijOpHjy58kcBNol1jlmGu3H4+SzSuomMr3bB/PJFNO 1oGbBVN9LWBk0HKekCNMlBufYcH54yO6hh5RgBz4= Date: Mon, 16 Nov 2020 13:24:15 -0800 From: Jakub Kicinski To: Andrii Nakryiko Cc: "Allan, Bruce W" , Song Liu , Andrii Nakryiko , bpf , Networking , "Starovoitov, Alexei" , Daniel Borkmann , Kernel Team , open list , "rafael@kernel.org" , "jeyu@kernel.org" , Arnaldo Carvalho de Melo , Greg Kroah-Hartman , Masahiro Yamada Subject: Re: [PATCH v4 bpf-next 3/5] kbuild: build kernel module BTFs if BTF is enabled and pahole supports it Message-ID: <20201116132409.4a5b8e0b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <20201110011932.3201430-1-andrii@kernel.org> <20201110011932.3201430-4-andrii@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Mon, 16 Nov 2020 12:34:17 -0800 Andrii Nakryiko wrote: > > This change, commit 5f9ae91f7c0d ("kbuild: Build kernel module BTFs if BTF is enabled and pahole > > supports it") currently in net-next, linux-next, etc. breaks the use-case of compiling only a specific > > kernel module (both in-tree and out-of-tree, e.g. 'make M=drivers/net/ethernet/intel/ice') after > > first doing a 'make modules_prepare'. Previously, that use-case would result in a warning noting > > "Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped" but now it > > errors out after noting "No rule to make target 'vmlinux', needed by '<...>.ko'. Stop." > > > > Is that intentional? > > I wasn't aware of such a use pattern, so definitely not intentional. > But vmlinux is absolutely necessary to generate the module BTF. So I'm > wondering what's the proper fix here? Leave it as is (that error > message is actually surprisingly descriptive, btw)? Force vmlinux > build? Or skip BTF generation for that module? For an external out-of-tree module there is no guarantee that vmlinux will even be on the system, no? So only the last option can work in that case.