Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36968678rwd; Tue, 11 Jul 2023 07:55:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlHNKF0suofN1GCky1/hQUNZ/sVbkY8XrI3zVnnEGkS9w9mhK3asZO0x8pdVeHSWZtmaCRxv X-Received: by 2002:a17:906:7398:b0:993:da87:1c7b with SMTP id f24-20020a170906739800b00993da871c7bmr11098392ejl.10.1689087311921; Tue, 11 Jul 2023 07:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689087311; cv=none; d=google.com; s=arc-20160816; b=VxkxXiYP+NwPB/vAtZBjY4OzbD9b7prqnt+OGML+cl2+Eu2bnFNxL0W/zAPwf08MuU P1zwb/zoCApKQjh5hPQMsip6v3EqxYT2qnUB8UHSvyi+k22mhdwNXQhzEryi84ybvOFK zO1IMXgOj54CKpU2G0nWMyE2ge071IvsKcl/jGzBhB9wqSfJr4O6ZwkgFafY5rFd4Qbd yBfjAtW4r4Ar9DVgcdMCmBjPfJVJjjbTvVHPS1xiwtAZ2cu8KbY6RUXJPSarAo1mU0TA SjbI6wnf4qSXf1OGo1ctY2wsMt+GuWdgl/fiKXveYk34eYw244/MOvIaZJLV7BGrpqVC DMtg== 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=KtTSHdQg0YCAtxJ0hEuqKRNYfw6pZc0XMvsle82y98s=; fh=3tOsHFOPrz73fWsjLWz5CRN0JnKYO9S3BWg0xZUQLtM=; b=BAYy+1u6qvT2K6aZMjSm42LuJaxLVxjh77fqlsFQ/cIMBwrzAg3Tcii0a/UcaOCJ5G /C7bnJqQ7zx84rwFRL2bXxnRcfRLBelJo8uK2iEwMkpLW2Q7P1sWPwzyccSHtQ6vgzmf /RLq0n/2T1ghz9sP4XV+v2TzJgtO+CPUiAjkSs68yuIN/pq5czHX6SM7mT5F2V0FYYeA fcqRxrXOa0ztNN9kZ84RhlhWYwMrzzSCbT6PIWKqNuAtW6ez2V5d7KEK3ePyKLER3V+s xUl97PIFUqMRSMO2cg5PdjJcS53AooepxZ6yvvWU87WcgiYrqMAxBCmy6WgwHAjU2lgz s4pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=TLY7AgKR; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o14-20020a1709061d4e00b00986441fe930si2361702ejh.103.2023.07.11.07.54.45; Tue, 11 Jul 2023 07:55:11 -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=@gmail.com header.s=20221208 header.b=TLY7AgKR; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbjGKOjm (ORCPT + 99 others); Tue, 11 Jul 2023 10:39:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjGKOjk (ORCPT ); Tue, 11 Jul 2023 10:39:40 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADFB9C; Tue, 11 Jul 2023 07:39:40 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-c2cf4e61bc6so6926405276.3; Tue, 11 Jul 2023 07:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689086379; x=1691678379; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KtTSHdQg0YCAtxJ0hEuqKRNYfw6pZc0XMvsle82y98s=; b=TLY7AgKRbyH6OnSPJ9DlYOyb0tY23mdMyNZyMPVQJwFRFxmkYyuycEFFv+r/0Cvlfb cXnx3pUDbdhdB7JFCxLw/wc6DL1DOGuRiVXpgQnfv4YwuUYgXrKKu7bP/wCEWApMmnKP 363lfl8o7ZY/Kuwm48ioU2u57auUY5mW0De/lS9s7niiohlZMXlpdHCiMJjD3Ap5VleT eOeLUp6uGt9gg36d7ytKY/RoctpWa4iTtqdAY8AW2AOin6OdgNJYcg85NLtjI7XwOcG8 MEsChbAT2uHZoPFSIR9QSVpHTXER9HL7JpuF7BEMOXCxmsASFZwQY4L9YnZlomyeRaQx 8K0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689086379; x=1691678379; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KtTSHdQg0YCAtxJ0hEuqKRNYfw6pZc0XMvsle82y98s=; b=W2cPojTkSNbduliA6dsOUVSgAockwugoWP5RWndjEqL07DSbFK09dmooqVk1JDrXZu 08tMQLQkBc+724eQPM0MzSyBIvfyfpJcQ8P8NpJXQ28bwpJ3hj/oKjMdvwP8fzKi3DRt oNd3M5wQWhfUhKAZ7xDJRXYWVtmFYNbwUESVkaj/LLBcBKBFMTnECQqr8qE0PqqrsjNb EAtKGg9ak9ivxHMqjMXPUapVh2s6lTP13CV7NHHjnRRWKJb0mXIygaEzYpCjs+Fvndz/ mlc9HVjqPj9fvNZHZe7YIstnf+UUSMJ7/XWii9CbIb/B+7dKbxq7VQNefVw0flkh4TqR ugiQ== X-Gm-Message-State: ABy/qLbvxJ2aOHdmRfU5r94RCBrpQg2o6THlttsWlBTFUe3q1Vh6sjYa PZQCyyzEYxMU2zYM8lrNu3wks3J1PQlGNppb04p7jTn0pcM= X-Received: by 2002:a0d:fb03:0:b0:565:cf47:7331 with SMTP id l3-20020a0dfb03000000b00565cf477331mr19036939ywf.2.1689086379216; Tue, 11 Jul 2023 07:39:39 -0700 (PDT) MIME-Version: 1.0 References: <20230704052136.155445-1-andrea.righi@canonical.com> In-Reply-To: <20230704052136.155445-1-andrea.righi@canonical.com> From: Miguel Ojeda Date: Tue, 11 Jul 2023 16:39:27 +0200 Message-ID: Subject: Re: [PATCH] btf, scripts: rust: drop is_rust_module.sh To: Andrea Righi Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 4, 2023 at 7:21=E2=80=AFAM 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=3D` 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=3D` 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). 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