Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37031950rwd; Tue, 11 Jul 2023 08:35:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcSa7Jin25lU0L+LOyoqviz465gLdXfPLVQ/880LZGS3GvJ81YFLAfXLyNTA4zuuZG95eH X-Received: by 2002:a17:90a:6588:b0:260:a8da:536c with SMTP id k8-20020a17090a658800b00260a8da536cmr22763489pjj.23.1689089759628; Tue, 11 Jul 2023 08:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689089759; cv=none; d=google.com; s=arc-20160816; b=aqY2Zgtu5VI/YGPG48JcNQbgb4T3qJRL5NT2dvLQ6xsa+Mb1LUDhl0aMfL+khZ+osA tKsiWWX7CNwqxtAZxUmICkYOJPC1w3l7JX7LpaSCPJXDOjra3G9a2K28WqEcnRB1iWxu DvWTLOZ3VV4jz7PhrB5wok6wv9dNIHTE9fRHEBZ2Rl9Sj7ogXFrIvZFXPPL6dHE2nUJf bRUbmBsgulceiWxPqtBw7TVnTMVZauLG8gY0P3ihdLX1NwwtOxk9yo0n9lCHp7Y3LnJY 4yHgOLqluiCh6EBjHwzdoBa0bbhfhJhOJRwfcQzlWoNvbHhM8gH3qHOIs3iqErLEuQob 29XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zBS1kUVYnl4zbNq8VpIr8q1zCpc4ruBaI0DcQqmBCzU=; fh=EFk1VmzLr4Bb6xE9cRGAYpG0ytt1FV9Ctji7tCkYYX0=; b=ljKAcS8dzajqUnoh/GFRsd5Ao30ejbj23zl0Bo/5GnzLaf0dep14+fNGH7epHqhfXY Cd7l+K7rbWy+iEpfAGI4ASswHL4boPIeRLtuipc4/qIVuZMQ2ocpyZTJTEYaPWWXLgVk +OrAS1N6H81BwBsVJboaRUCE0nsOXeGmXr2A+Au9Yep8k4tFMMUjmYG/VZChDccggtsh iDScbAKjySIUAVsvqRN9QwIqMf6UbifjNV5w1iEmUONaSn9bOcj0md47eKSUgb0j1u4Z 9p6Nuq3qZmTDZ2KSJ7yyT3u3S/6XpE8hN2KTxKf3ikVfbfNaDwbUSn76ceAJgxVZzw46 rFcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=FTAwV1cv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ng15-20020a17090b1a8f00b002631f72d2d1si1824802pjb.173.2023.07.11.08.35.46; Tue, 11 Jul 2023 08:35:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=FTAwV1cv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231716AbjGKPSR (ORCPT + 99 others); Tue, 11 Jul 2023 11:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231782AbjGKPSM (ORCPT ); Tue, 11 Jul 2023 11:18:12 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDFB3100 for ; Tue, 11 Jul 2023 08:18:10 -0700 (PDT) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 5CEB53F738 for ; Tue, 11 Jul 2023 15:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1689088689; bh=zBS1kUVYnl4zbNq8VpIr8q1zCpc4ruBaI0DcQqmBCzU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=FTAwV1cvwS6sg0EXKFhDUBYS65rw+UH4Blhj9A0XgqmSms3YQ3Qolxs89At0eF7eJ uPnHNIj2kHA2Woi6ec9HWuMY+SUNUO9ZzwAUiMHdul7FAFXtYqn2kLuACpDnDFoSMM bf8qBHB1XyR4r0xkJzZmkg7zqijVnV164uMp8v0m4VBsepW7sHEWpfyvaYoCOv5HVz JOrJgVaajKqXAq2Jg0iwq/XebMLlmwTEW10MoAUZ3RjzAfingcJgyruhC5MAgl95Kl wDSZsDgfggM8LDBDbH7X+Ykz/MsgPU/QRaBBhQYrNkDPvAO/x+ds9FkI0pFTXL+ykh al7Ou1YjHzHRw== Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-51e5a6bae66so1301186a12.0 for ; Tue, 11 Jul 2023 08:18:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689088688; x=1691680688; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zBS1kUVYnl4zbNq8VpIr8q1zCpc4ruBaI0DcQqmBCzU=; b=KHYNTCfj5ZkdOhJ6ae5AP03y5MUOfGKBX6e42dnqpA1ONZbEXogGAnMQC+jJE+y9xl CroE/EqBPQ7W263bfWEChccZtJJuKAB05hHuhW8Ovx+4n19H31wfZxYfvTMIj8AgdVqS vw7zaR0rREcp7xfpqy9b0dCsx5ek2DfRqdMoZ+l1+ZYYwwaWU7hGAN/HDPPoY9Fx9GPX T/oInTme35lKzGo9Fwhqn0lfV2v8efZT5l/KXiOIJ9xdZaRQsZzCQr9IBYimrseERate U44zyH7kM6Fg3tFOaMqdIFUcH8LLNoxG8obChSl4zIbh4qf2X3PTgm8vHBJwPXEFnV/5 sgGg== X-Gm-Message-State: ABy/qLak8p5gaGYZgxxuoHRUn+LL5/RdtoBLSrkLFsQ1vZYEcsTFnCi8 M9sdzr941/0yW/iNJgrnDunfYMogjUU/7lFw7UUAne1XJvKu5STfBeRALs/HVzOX4Sqq3Rp+aji 0VRSLBQuFZz9Y7qfwlH4H1s4m/0SxnAc5X+hNg899OQ== X-Received: by 2002:a05:6402:6cf:b0:51d:d37f:ab49 with SMTP id n15-20020a05640206cf00b0051dd37fab49mr13026169edy.6.1689088688227; Tue, 11 Jul 2023 08:18:08 -0700 (PDT) X-Received: by 2002:a05:6402:6cf:b0:51d:d37f:ab49 with SMTP id n15-20020a05640206cf00b0051dd37fab49mr13026148edy.6.1689088687917; Tue, 11 Jul 2023 08:18:07 -0700 (PDT) Received: from localhost (host-95-234-206-203.retail.telecomitalia.it. [95.234.206.203]) by smtp.gmail.com with ESMTPSA id o4-20020a056402038400b0051dd1c10c13sm1400778edv.29.2023.07.11.08.18.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 08:18:07 -0700 (PDT) Date: Tue, 11 Jul 2023 17:18:06 +0200 From: Andrea Righi To: Miguel Ojeda Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Tom Rix , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, bpf , Martin KaFai Lau , Arnaldo Carvalho de Melo Subject: Re: [PATCH] btf, scripts: rust: drop is_rust_module.sh Message-ID: References: <20230704052136.155445-1-andrea.righi@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 11, 2023 at 04:39:27PM +0200, Miguel Ojeda wrote: > On Tue, Jul 4, 2023 at 7:21 AM Andrea Righi wrote: > > > > With commit c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole") > > we are now able to use pahole directly to identify Rust compilation > > units (CUs) and exclude them from generating BTF debugging information > > (when DEBUG_INFO_BTF is enabled). > > > > And if pahole doesn't support the --lang-exclude flag, we can't enable > > both RUST and DEBUG_INFO_BTF at the same time. > > > > So, in any case, the script is_rust_module.sh is just redundant and we > > can drop it. > > > > NOTE: we may also be able to drop the "Rust loadable module" mark > > inside Rust modules, but it seems safer to keep it for now to make sure > > we are not breaking any external tool that may potentially rely on it. > > Just to recall the history of these changes: > > - The script got added in order to skip the BTF generation in the > `BTF [M]` step (under `DEBUG_INFO_BTF_MODULES`, which depends on > `DEBUG_INFO_BTF`). > > - A few months later, it was noticed that C modules couldn't be > loaded if Rust was enabled, due to the base BTF info in `vmlinux`. > That triggered the eventual addition of `--lang_exclude=` to `pahole`, > but meanwhile, we made `DEBUG_INFO_BTF` and `RUST` exclusive. > > - Now, this patch removes the script because having a newer `pahole` > also correctly skips the Rust CUs in the `BTF [M]` steps (i.e. and not > just the `vmlinux` one), since we pass `--lang_exclude=` to both cases > (`link-vmlinux.sh` and `Makefile.modfinal`), if I understand correctly > (the script could, in principle, have been removed even before > `pahole` got the new feature, given the exclusivity of the options). The history looks correct to me. Also, note that, if pahole doesn't support the new `--lang-exclude=`, we have `RUST` depending on `!DEBUG_INFO_BTF`, so we fallback the old "exclusivity" mode between BTF and Rust and, again, the script is not needed. As you correctly say, in principle, we could have removed the script even before the new `pahole`. > > If this is all correct, then the patch looks good to me. I am Cc'ing > Arnaldo, Martin and the BPF list. > > If this goes through the Rust tree, I will also pick the older `Reviewed-by`s. > > Thanks! > > Cheers, > Miguel Thanks, -Andrea