Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3420220pxb; Mon, 16 Nov 2020 14:19:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRaPtrRsliUY2BdDiKuSHXU0p8YbZw/aog4x18awJ1MCDhH+EMVn2JuTg5lz2CRNwP6flY X-Received: by 2002:a50:fc95:: with SMTP id f21mr17387912edq.383.1605565165154; Mon, 16 Nov 2020 14:19:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605565165; cv=none; d=google.com; s=arc-20160816; b=ldZFMMxGfpjS+zN3HMn/Qmd6omuw0p8FWgB8GM+C0/daJgHIHWyHq+dYYY7nc1m8CL gwJBtyFnrnVW1qpI1bPdMBSfANt9sJnU5SpH1jyl4JyEWUfwUzCm89VxrgKYShQDu0nq nym1fNLYXcgOYUE1614Ir9GS4FfPx+ZL/RDSgQKQ3aNkgHxTYaJbR72hCvMhLnnQ3rTd qmGc+wTJfSkaZ8RCxKhhu8mzY5su5vlLzxjE7WJVsVyhJdzSKJh4v3zZs849gwfBSDF/ O94c1e02A949k2/d4gwkmAShuTomVA2egzTEh7HZ2DSazfa651I2v+W4f/gaSfOAwhap EYTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=c8o0lWTV5oFYZGA8cq/w+A4j784ox49dpPJ856/9JoM=; b=RyRKomUzHQnLcm5hi6kVN6FdknkFEFn+tUsyJSbuUIAmt0lW6R2fkE3Y17quokutJQ 9OvfzfMKLv+EEVAZBbZwzOAKcHeJAodqjfd1IK+urIYPl1rHjo6PpRDppw5859X2vbxD CbCUXPxcxBuXnB9/9w2KEllt9B4go4lNDSGhly450sSX78J15w/FSWTEImX2Sgl2Rydw IeaFtz2qWsBuM27HZVHEZVw+Y8IdXPoD7QJ4LZMUMahW4nJNsRZQtlRVp/qa2BdxgHmd XPGvNOxVx8VVYMaacEdxV333rpd7K0IAxOqTxy65g2nHvUcz2g57Uk+rzHAy+ebhfHgX f3CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i0uHo1Qo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hq21si11480443ejc.616.2020.11.16.14.19.02; Mon, 16 Nov 2020 14:19:25 -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=@gmail.com header.s=20161025 header.b=i0uHo1Qo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733011AbgKPUeb (ORCPT + 99 others); Mon, 16 Nov 2020 15:34:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbgKPUea (ORCPT ); Mon, 16 Nov 2020 15:34:30 -0500 Received: from mail-yb1-xb41.google.com (mail-yb1-xb41.google.com [IPv6:2607:f8b0:4864:20::b41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 435D1C0613CF; Mon, 16 Nov 2020 12:34:29 -0800 (PST) Received: by mail-yb1-xb41.google.com with SMTP id s8so16819812yba.13; Mon, 16 Nov 2020 12:34:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c8o0lWTV5oFYZGA8cq/w+A4j784ox49dpPJ856/9JoM=; b=i0uHo1Qo0705jAtRWcfkcq4XzbWhc0j+mLT2XM9K4XHtRrUnu/1geVgadH75aauxaS hLSZ2K786RPSLX4dVSe8KOLb5X+9fi7crS1KkuWQeqgCHpXt/vF+HGQh/V9AqPnSo30J WRha7bZ9J/MzVi6uhARO3bEV3M3W7W0lW8J+njB+mufdrgVi56PwMu1KhlxjAhBctbtm 3tOc0BwPD0DqC9KWe4D7seLJm7zHjbU73OUP7atwg3OjpLHGEQR6ZzsQNznup27J6ACr 1K2RX3ST3kPYc19ohBqm45gJsGw+GONXvoss+Fr4kkerBRd2UyBGLZAoPKIDWXPl67I5 EJRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c8o0lWTV5oFYZGA8cq/w+A4j784ox49dpPJ856/9JoM=; b=g+5/otAy4mSvArGOmoABXBMiM8K2y2uiBRLGnYkz7dijJKX/co88Isn+vLs5+cymQL bJHs323TjYhgzKV96ztZIu1eJXAgchCG94E5yWPl2BfI9NaobgWs7VVkOUhH59J2Zzzd vNkDbqKBYe/nDEMkT4RL/XK3DKe4N34x+5J4x56/NrQs9XwTauxm1kbJXzKcvAGKcS+/ 90tsxmwXxjExj9X/0Z9mJYcIDPYVDWza9k+Qje7bQPt5IHeBwv+c/b7z7ms1WiVeaupn +NzC3WPXtu6/Hltnu6PlYh5WFKQuFv86YNF/sVJjF+mWeqUxSbvSzETmASoXRY2b4Cma oEJA== X-Gm-Message-State: AOAM532JMImXdZhLo21AVsD95YR/Y8Oh3d7wbTLdwHEOPta7ADZ4WLEN jm7l1uBjr2v+SQRk4LTV+pPYWTMUgGzqn6UX4o+7oNl//wM= X-Received: by 2002:a25:3d7:: with SMTP id 206mr23184703ybd.27.1605558868531; Mon, 16 Nov 2020 12:34:28 -0800 (PST) MIME-Version: 1.0 References: <20201110011932.3201430-1-andrii@kernel.org> <20201110011932.3201430-4-andrii@kernel.org> In-Reply-To: From: Andrii Nakryiko Date: Mon, 16 Nov 2020 12:34:17 -0800 Message-ID: Subject: Re: [PATCH v4 bpf-next 3/5] kbuild: build kernel module BTFs if BTF is enabled and pahole supports it To: "Allan, Bruce W" Cc: 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 11:55 AM Allan, Bruce W wrote: > > > -----Original Message----- > > From: Song Liu > > Sent: Tuesday, November 10, 2020 5:05 PM > > To: Andrii Nakryiko > > Cc: bpf ; Networking ; > > Starovoitov, Alexei ; Daniel Borkmann ; > > Kernel Team ; open list > kernel@vger.kernel.org>; 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 > > > > > > > > > On Nov 9, 2020, at 5:19 PM, Andrii Nakryiko wrote: > > > > [...] > > > > > SPLIT BTF > > > ========= > > > > > > $ for f in $(find . -name '*.ko'); do size -A -d $f | grep BTF | awk '{print $2}'; > > done | awk '{ s += $1 } END { print s }' > > > 5194047 > > > > > > $ for f in $(find . -name '*.ko'); do printf "%s %d\n" $f $(size -A -d $f | grep > > BTF | awk '{print $2}'); done | sort -nr -k2 | head -n10 > > > ./drivers/gpu/drm/i915/i915.ko 293206 > > > ./drivers/gpu/drm/radeon/radeon.ko 282103 > > > ./fs/xfs/xfs.ko 222150 > > > ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko 198503 > > > ./drivers/infiniband/hw/mlx5/mlx5_ib.ko 198356 > > > ./drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko 113444 > > > ./fs/cifs/cifs.ko 109379 > > > ./arch/x86/kvm/kvm.ko 100225 > > > ./drivers/gpu/drm/drm.ko 94827 > > > ./drivers/infiniband/core/ib_core.ko 91188 > > > > > > Cc: Masahiro Yamada > > > Signed-off-by: Andrii Nakryiko > > > > Acked-by: Song Liu > > 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? > > Thanks, > Bruce.