Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8805245rwb; Tue, 13 Dec 2022 10:36:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf7UPr8+6oC1LhBrLoZHhYF5yTi62JGJnjvwKrvYa7kwtbSs4wKhGDPsUetevu4rro8xTGm+ X-Received: by 2002:a17:906:9705:b0:7c0:fd1e:972e with SMTP id k5-20020a170906970500b007c0fd1e972emr16473179ejx.46.1670956609097; Tue, 13 Dec 2022 10:36:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670956609; cv=none; d=google.com; s=arc-20160816; b=ZJcO4f+TF28269IP6MrXLDrA236ywUR3oMAnFt0nUS5Y1DgNdomZUIuLeZoo5gqBVL pOb+MbSfKJomPbQEQ5CeUh8Ez3O9A9+QMenLl7mLLSgIb5koctoS6M58tfhI1I6/7CD6 z+ZBpmkqjoHfA1KGX+HCbtla3zwCwkK/LtmFOagVXfh6gQVZm2jwHGrgrVxHPk1PO/cD uEXc3O3v1e0rwNVuIR2g+ZksA9UaVvikiaW1CNAnUCaYXsAD3xNqQAcGIpl3B1Wr900N GpFVsFaTiO2SYVpEbsZDhQ4Y9w9ewVpv4d34BCqFlJD5GF7YaaFuHaeenKSbzWebO3zn E5fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Xe9Tk/WeS+bV8wXeVfzvFiQUclsLCWtSXwsfvOk1/R8=; b=Pg7Q8M4/uWXmqPwWhlb67kj2Y3989XMigXWdFfIIzRfLiQ+zUU7E3UKwr3keVwEgy0 hrf+FIRkvpaLYPp3+PS6MuFujSfJ4sVvR3YiF/iDDz3XlSsPrViNqh3ydCjfqxDe3Lrl RHNKDTNbx4nY4L3li7HBwkAd3NFYvrJYA0jxEEgE9IOnq5pWaWOfN1J5WxIIFRralLTI MFxrA4bn0feyumMnXhaHVMaseKJvdiiWahaIvioMqJjR+en07fk53mB2pcVAfwTF9Zyt hqzpskxWdHadi55qdjL9pG+MfQayJxDfr/Bj/wSjC+aCmBUruOak95y1WjNBuL5AlEem GFcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jvuhGbNI; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf28-20020a1709077f1c00b007c1fa1e907csi429607ejc.992.2022.12.13.10.36.20; Tue, 13 Dec 2022 10:36:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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=@kernel.org header.s=k20201202 header.b=jvuhGbNI; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236610AbiLMSgK (ORCPT + 99 others); Tue, 13 Dec 2022 13:36:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236622AbiLMSft (ORCPT ); Tue, 13 Dec 2022 13:35:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B4802528A; Tue, 13 Dec 2022 10:35:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A7556616D9; Tue, 13 Dec 2022 18:35:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44E8CC433EF; Tue, 13 Dec 2022 18:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670956548; bh=RwcV3yZ+zQ6XKY/GbgFiJKf5T1kYYz04kemOgRUA7uU=; h=From:To:Cc:Subject:Date:From; b=jvuhGbNITwreRiZ6mCd8ZfwFCEd3fpRlqFTzUWuRSggeVUUy1Orke/XEnuiI7x7Bb SrYk/T4ta/dKNEBDyThYCbgfAeeIfVCjOeuVaZJ1D0aRa+gpPvK0p2AnzqkghlIioT 2Y+cRX+tm2izZVigmexK+TytaJrRbgQ5OBjTcD/s4Ot4vpw5RRTWtPZGNZNBs8UCJb dwfoR1DnFxBsPv3/FBgLWGajV9l9TKGuR07bfDPEbJ3boPmPZGjuwz7UqXfGk6BgXm JjylM3Xbe9FWUwzrGczbKKsyWM7yQHQb8T5KMcw1ZBnHM0QLO6LwYEYlHWQDliUOhD b7jXvkj3/YJ+A== From: Nathan Chancellor To: Masahiro Yamada Cc: Nick Desaulniers , Tom Rix , Nicolas Schier , Sami Tolvanen , Vincent Donnefort , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor , Steffen Klassert , Daniel Jordan , linux-crypto@vger.kernel.org Subject: [PATCH v3 0/2] Fix lack of section mismatch warnings with LTO Date: Tue, 13 Dec 2022 11:35:27 -0700 Message-Id: <20221213183529.766630-1-nathan@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-crypto@vger.kernel.org Hi all, Vincent recently reported an issue with lack of section mismatch warnings with LTO. This is due to commit 6c730bfc894f ("modpost: handle -ffunction-sections"), which ignores all function sections for modpost. I believe this is incorrect, as these function sections may still refer to symbols in other sections and they will ultimately be coalesced into .text by vmlinux.lds anyways. The first patch fixes a warning that I see with allmodconfig + ThinLTO builds after applying the second patch. The second patch moves ".text.*" into TEXT_SECTIONS so that modpost audits them for mismatches. I expect this to go via the kbuild tree with an ack from the padata maintainers. Cc: Steffen Klassert Cc: Daniel Jordan Cc: linux-crypto@vger.kernel.org v3: - Stick a comment above padata_work_init() to explain presence of __ref (Masahiro, Daniel). - Expand on problem in first patch's commit message (Masahiro). - Adjust location of __ref within function definition (Daniel) - Fix typo in commit message of second patch (Masahiro). v2: https://lore.kernel.org/20221207191657.2852229-1-nathan@kernel.org/ v1: https://lore.kernel.org/20221129190123.872394-1-nathan@kernel.org/ Nathan Chancellor (2): padata: Mark padata_work_init() as __ref modpost: Include '.text.*' in TEXT_SECTIONS kernel/padata.c | 12 ++++++++++-- scripts/mod/modpost.c | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 -- 2.39.0