Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2211175rwb; Fri, 2 Dec 2022 06:59:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf53JVD6c9SfcljbQNNN6AwDmwWbVshKQj4bc1TwX1mn6/dO85kYDAzzINrAr8/s9whKNCAi X-Received: by 2002:aa7:cc12:0:b0:462:79ec:55eb with SMTP id q18-20020aa7cc12000000b0046279ec55ebmr62966421edt.151.1669993165432; Fri, 02 Dec 2022 06:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669993165; cv=none; d=google.com; s=arc-20160816; b=Uiigvl5DEWJnl0iA8Pu+wnRqhPhuYzAVQJt176wcSJasbjG4whhU5CfqPvvTtMS6ZR 7/YxXdqChDhLZ7o/nSAn31ZudPYz9uTUGMr/s5qVOwVFe5FnQyshkUKzgK23q+dhzjzc kLSil0P0g4rjDbm5zcNmffe+yvEvlcadMQMcfKPrVBoz7trPi90z35GcMo4Dg/RhXHK4 kGe3WkOLOBiwWxIbo+ug71GdExPU2P2x++A0AjGNVVG0mVUX56zOJz8IZeFQ10FA49w7 +3G9SZXO1otooeBaQGWDbyRPLv0lh0eOfeQwzitPxS7ecV41wJHa5uf4bomM1xgihTMh h2tw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dFk1+hkpBmMLap6sfB9gsTUqSquI2hUsv5hQdZ+cfCw=; b=gM77lbq/NmBeuO30ZJF9DKyQbbuSp1Efxp81LghRB51KsWphO4sVObiuGVIiga58Aq SgZ4munyJgRgvMkt6Xw7z4d+02wLUPt/lYmM3Gt3x7lChgMlznsgu32RQxLAAb7HBBcz S9Jb/N++JU1gNrk9fX1TKgfXF41hlxJ2gHVh4XwVh084ec2aodBBGsusOHenKYvhX8Ok PAzDwpFQW46VUkSbAZCi7uAXBoTmMedAW7+RfIKU1LzEch30Qhbj0uk5J1xKqA638Y7b apfrwKeCvTKbN6YmAUpRAaL0kQH0Y3brG+kRbNe0KZSUUqAQR5U1mZTKRpPyssI3Dfbt 1q7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E0nDJXfC; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf21-20020a1709077f1500b007b911ee70cbsi6645972ejc.796.2022.12.02.06.59.04; Fri, 02 Dec 2022 06:59:25 -0800 (PST) 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=@intel.com header.s=Intel header.b=E0nDJXfC; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232517AbiLBOqL (ORCPT + 83 others); Fri, 2 Dec 2022 09:46:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232953AbiLBOqI (ORCPT ); Fri, 2 Dec 2022 09:46:08 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081EBC2D3E; Fri, 2 Dec 2022 06:46:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669992366; x=1701528366; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YeOXBTpcKW54/I4KLp5hnE2yhE4BreCqf9VS8FQha6M=; b=E0nDJXfCf4nCQJvL82Z+HOWykRiF95wt3KB1EcbgNCcP5B7DfpEsRxAv gnSI8pdMs0LML30b8SwMXXUBDfInq+LPm7dUt0iPQrfC9mZhvFWhsyWe8 9Jak6qB8bX1XQw6vrnT++5uie1wnb8p6WQjICsM2nEa1jfa0DRQwXBvgT OGcMGBVM2gCtsN2nfUOclukKWHqClE85/aWTDDrEMPXkoKbjZxYbzWrws 2skMn9Y+OCF+ma+4US3NIABpp7gckWj0jJ3B2cKlLgPe3uu14F/3ggB9b 812v6R+JTgTeSeYfyXA4CSIbWtLoZSouG4Az1STMdPepm6tany/ZTa3Hu Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="303568477" X-IronPort-AV: E=Sophos;i="5.96,212,1665471600"; d="scan'208";a="303568477" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2022 06:46:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="675849501" X-IronPort-AV: E=Sophos;i="5.96,212,1665471600"; d="scan'208";a="675849501" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by orsmga008.jf.intel.com with ESMTP; 02 Dec 2022 06:46:02 -0800 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 2B2Ek1m3018822; Fri, 2 Dec 2022 14:46:01 GMT From: Alexander Lobakin To: Nathan Chancellor Cc: Alexander Lobakin , Masahiro Yamada , 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 Subject: Re: [PATCH 2/2] modpost: Include '.text.*' in TEXT_SECTIONS Date: Fri, 2 Dec 2022 15:44:46 +0100 Message-Id: <20221202144446.3395140-1-alexandr.lobakin@intel.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221129190123.872394-3-nathan@kernel.org> References: <20221129190123.872394-1-nathan@kernel.org> <20221129190123.872394-3-nathan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 From: Nathan Chancellor Date: Tue, 29 Nov 2022 12:01:23 -0700 > Commit 6c730bfc894f ("modpost: handle -ffunction-sections") added > ".text.*" to the OTHER_TEXT_SECTIONS macro to fix certain section > mismatch warnings. Unfortunately, this makes it impossible for modpost > to warn about section mismatchs with LTO, which implies > '-ffunction-sections', as all functions are put in their own > '.text.' sections, which may still reference functions in > sections they are not supposed to, such as __init. > > Fix this by moving ".text.*" into TEXT_SECTIONS, so that configurations > with '-ffunction-sections' will see warnings about mismatched sections. > > Link: https://lore.kernel.org/Y39kI3MOtVI5BAnV@google.com/ > Reported-by: Vincent Donnefort > Signed-off-by: Nathan Chancellor This revealed a couple issues in the FG-KASLR kernel. None of them are false-positive although FG-KASLR doesn't merge text.* into one section in the final vmlinux. Nice! Reviewed-and-tested-by: Alexander Lobakin > --- > scripts/mod/modpost.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) [...] > -- > 2.38.1 Thanks, Olek