Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp200194rda; Sat, 21 Oct 2023 04:38:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6/xAFO+xdg0hCwkEPqLRaz5aQkeb4WKw1JoPG/wgOl72d6HR7aTrgQFzWGCZOFeHmsyW6 X-Received: by 2002:a17:903:2348:b0:1b7:f64b:379b with SMTP id c8-20020a170903234800b001b7f64b379bmr7007098plh.17.1697888318928; Sat, 21 Oct 2023 04:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697888318; cv=none; d=google.com; s=arc-20160816; b=B5w4jXDVHVh03NJVnIt5iChmU05dklUkXCo6VtIXwtIZrM1FuwW7Rxyux4SwWLkRkJ 6nVEaYi85OjQprQpd+0xnhRjCGnqbgPwstXC3aKhUC2ZaYUFeIhqGqpfgCaPWC2kKrYn F5qw0jyDtJ7685U5ZAPgwxkVwFlcvU95KWEdpSr4uQFsJkoa0IOC7KK4fJv2/Pi8IKsH L4sdsF2Lf8RsaeirrOh9Q3Geegi+Qo/AipmsgU38ebpQaXbODVVOK3ILSVIs40J1XsR7 O1cqYbLmxPQDgolIWnrBiJzatYmTNOW7BlrIvJJvWH8kZSZ6ZidKk/EiSffANtRqEXXv 3aNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZV4QusYS3tN1ROE6Nxd34bC7RytlWhI53rl0rI4wNDY=; fh=E1r7MPr3tkb2zNFRft5u8RJQBd6tDrPQQAXR+nCnzfs=; b=sW0CuzP1WOPY3mCE1YJZbOuXzjw4SRdcGh4OKHrRHUtq6o+fKWB7RJdvkothw8960f UJ5XnwhZh3Rd+BshIMIumaxijfRIAoWFjnX5/wBY0mesaBqo6xiOZJSE+KrB4Z/NZyNn utTe5ymV1cHzZtpgL8P61nYKutgx7UghWJJ+eEl4O1SP64gdom9Aa2YtFcDjx5ICpKVb sG8tUWvBjsy/1PW4EYy4Qrm6Zs9ufQBrECGs1CbHLqGm7IsWoTKCqEkjp69ByJEA9+g2 O/nkZ6WhmF+jwNzqxeogt4TIMllVgqKOckfo76ouMgx7X7QEW2uFztLvbevpuhvU8XgE qJ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K1RfshJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id v11-20020a170902d68b00b001b801044467si3250056ply.3.2023.10.21.04.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 04:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K1RfshJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 09DF981ADCED; Sat, 21 Oct 2023 04:38:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230309AbjJULiI (ORCPT + 99 others); Sat, 21 Oct 2023 07:38:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjJULiH (ORCPT ); Sat, 21 Oct 2023 07:38:07 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 496781A3; Sat, 21 Oct 2023 04:38:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7323C433C8; Sat, 21 Oct 2023 11:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697888281; bh=CItNLUhgPKWprZgDhoE5AHbH/bbnD7boGHI0AXjLGCI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=K1RfshJfvG+iK1f5POzdM2+SCvqS01LqDm71qUBujpZCK0J9k5Epc0RxBLUn5QmNy uENT3RhYdkA+ycQxIUPo7eAfTWbRJw3Z/pcKEtg/9OYibGvV1tOlzydDRM5UAdBdcB pBBfgSs/1SorGnF4tBwLGCZqpi3QCbUwMvOVjnEJyt4jnaOlov0Pf9fE9IfmxIdIgq UpwXWZYylq4UwrRpu1quekYcVjKP8FsNaERavFI6uYCutglsIRZ0AczpeW/qXZ2gP8 0HD4EScsNKpPEAXP/POpSPQDSkt1L3ntKcQ/PDNQDOi4nMy0Ci3wnVwlceX8p3z0Hy awP9Y4K/dKmuw== Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-1dd5b98d9aeso916386fac.0; Sat, 21 Oct 2023 04:38:01 -0700 (PDT) X-Gm-Message-State: AOJu0Yw+oDbnD3IIsXCttUb8bIDZJVMLGlJIRHV41hadFwNAGUyMxnLH 31R0BOM9osM7qBsdkUFrcSJcCLMawne7v+MgWmA= X-Received: by 2002:a05:6870:c087:b0:1e9:dfc3:1e6c with SMTP id c7-20020a056870c08700b001e9dfc31e6cmr4318161oad.28.1697888281221; Sat, 21 Oct 2023 04:38:01 -0700 (PDT) MIME-Version: 1.0 References: <20231018151950.205265-1-masahiroy@kernel.org> <20231018151950.205265-4-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Sat, 21 Oct 2023 20:37:24 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [bpf-next PATCH v2 4/4] kbuild: refactor module BTF rule To: Andrii Nakryiko Cc: Jiri Olsa , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 21 Oct 2023 04:38:34 -0700 (PDT) On Sat, Oct 21, 2023 at 5:52=E2=80=AFAM Andrii Nakryiko wrote: > > On Fri, Oct 20, 2023 at 12:03=E2=80=AFAM Masahiro Yamada wrote: > > > > On Fri, Oct 20, 2023 at 7:55=E2=80=AFAM Andrii Nakryiko > > wrote: > > > > > > On Thu, Oct 19, 2023 at 1:15=E2=80=AFAM Jiri Olsa wrote: > > > > > > > > On Thu, Oct 19, 2023 at 12:19:50AM +0900, Masahiro Yamada wrote: > > > > > newer_prereqs_except and if_changed_except are ugly hacks of the > > > > > newer-prereqs and if_changed in scripts/Kbuild.include. > > > > > > > > > > Remove. > > > > > > > > > > Signed-off-by: Masahiro Yamada > > > > > --- > > > > > > > > > > Changes in v2: > > > > > - Fix if_changed_except to if_changed > > > > > > > > > > scripts/Makefile.modfinal | 25 ++++++------------------- > > > > > 1 file changed, 6 insertions(+), 19 deletions(-) > > > > > > > > > > diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfina= l > > > > > index 9fd7a26e4fe9..fc07854bb7b9 100644 > > > > > --- a/scripts/Makefile.modfinal > > > > > +++ b/scripts/Makefile.modfinal > > > > > @@ -19,6 +19,9 @@ vmlinux :=3D > > > > > ifdef CONFIG_DEBUG_INFO_BTF_MODULES > > > > > ifneq ($(wildcard vmlinux),) > > > > > vmlinux :=3D vmlinux > > > > > +cmd_btf =3D ; \ > > > > > + LLVM_OBJCOPY=3D"$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) --= btf_base vmlinux $@; \ > > > > > + $(RESOLVE_BTFIDS) -b vmlinux $@ > > > > > else > > > > > $(warning Skipping BTF generation due to unavailability of vmlin= ux) > > > > > endif > > > > > @@ -41,27 +44,11 @@ quiet_cmd_ld_ko_o =3D LD [M] $@ > > > > > cmd_ld_ko_o +=3D = \ > > > > > $(LD) -r $(KBUILD_LDFLAGS) = \ > > > > > $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) = \ > > > > > - -T scripts/module.lds -o $@ $(filter %.o, $^) > > > > > + -T scripts/module.lds -o $@ $(filter %.o, $^) = \ > > > > > + $(cmd_btf) > > > > > > > > > > -quiet_cmd_btf_ko =3D BTF [M] $@ > > > > > > > > nit not sure it's intentional but we no longer display 'BTF [M] ...= ko' lines, > > > > I don't mind not displaying that, but we should mention that in cha= ngelog > > > > > > > > > > Thanks for spotting this! I think those messages are useful and > > > important to keep. Masahiro, is it possible to preserve them? > > > > > > > > No, I do not think so. > > > > That's too bad, I think it's a useful one. I prioritize that the code is correct. > > > Your code is wrong. > > > > Could be, but note the comment you are removing: > > # Re-generate module BTFs if either module's .ko or vmlinux changed > > BTF has to be re-generated not just when module .ko is regenerated, > but also when the vmlinux image itself changes. > > I don't see where this is done with your changes. Can you please point > it out explicitly? That is too obvious; %.ko depends on $(vmlinux). %.ko: %.o %.mod.o scripts/module.lds $(vmlinux) FORCE --=20 Best Regards Masahiro Yamada