Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp45058rwe; Thu, 25 Aug 2022 23:46:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR7tAGWs1rJgUL+kZvxSjTXXFpezwGJTavLCY13KciMeOVxGWnhN0C7k6vqSdB0CWIlGf7le X-Received: by 2002:a05:6402:1388:b0:447:a3a4:6152 with SMTP id b8-20020a056402138800b00447a3a46152mr5654562edv.13.1661496360232; Thu, 25 Aug 2022 23:46:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661496360; cv=none; d=google.com; s=arc-20160816; b=etJaPJZ6Gvuwx+Q0fkpG1l6gQHNULYKL+fvfdmcVCIvlApYG/y8PnS7OTQgxDGlIXK LRpSZbvYGXssHb6b5YBloEf5nABgtOKcka7NHxAXC3lhqOeL5K4n+Q7l0Sc61Z3kPdZa OgxQO9Y6G6Z88LDouVerSSU8m0BxqmwF+qD9y4IJhMtw4o2JLAK/LiaXSvUvnvJCJeTF n2Lie32uhuj7aA+IsAYFwyKH5s8wbEwtCUuwF6ClUndeUEGDWny6mrVGTTQA247WOKfo 3R2Juth0ez4dEzbI6PQdBAIvipksgVcpsC8Uyixh6zeTh7w7/BFHwiG/lsAQkSLuHQn8 zL1A== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/ksBeTUHmWlvuGbkpYvDXnX3eaDAPgcM4+P+VXpboGE=; b=UiCyph/LfIgDAU6efXb0eg9nR7c6FR3ZNGsE44s3oQ8DAlS0cBZfTOgRrCF3FvWmmz rhBLCdIjgfI++d3JceesH1FcjBxNS/1yJ16bs61/WoQ2cCTT4rnEz6y3nclD64ucXhJB tACUG3i2NaihT0UW0umWSJD87ozd/gfNnJ4FzZSnojnZBjXkRjybxuKB5FU4lVDA2oJ8 afmryz81uJJ5mkGOu6pE8/nVWUgoskswl5nWzsZboH+slLpCMm+VG77uheSfGXbIggh5 W9KFvOF2MG0gHwho6rrNYC3PQJEcIThYqXZVoANXpO9SuxB2ci4lKcaqkKojAdq+7BI4 6BBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rFTshzAc; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt13-20020a170907728d00b0073d97715950si800038ejc.29.2022.08.25.23.45.34; Thu, 25 Aug 2022 23:46:00 -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=@kernel.org header.s=k20201202 header.b=rFTshzAc; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244858AbiHZGRw (ORCPT + 99 others); Fri, 26 Aug 2022 02:17:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230517AbiHZGRu (ORCPT ); Fri, 26 Aug 2022 02:17:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B120FA3D13; Thu, 25 Aug 2022 23:17:49 -0700 (PDT) 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 568AD61B1D; Fri, 26 Aug 2022 06:17:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60E6CC433D6; Fri, 26 Aug 2022 06:17:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661494668; bh=mwT1dGC6kgb6AMZv9hcU8/lgllHF8A8Rmy50wbfJ4hA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rFTshzAcm4WiW7FyYI+N3OS962g5eYDtI+wh3aasb+sv2dcnJ7y5LufQJNXuNP/3r mUlGQ35SXTU/mNazDpo+8eBn7aKw0YinYX1VVbRihk4bZbO77DFe289A4jN/2peHKh XF/lHQr46fZT2aRNsKw4heuVI+JhaL2kV6fdbTxVw7yi+iRO0nwzzhPlIdFukbR2+V r8TRYTj3wt64S26a9bs9Zudflf6WeTY1XRrrbmB0fWYuHfCrPY7/gT6mvisBRZkOAu WTRqMIJTObtSVg8YM6lGsTH82Ox+y6teK0AkpHkY7HapXpHMJSURROei6bE817FhFG CZgMwSF6OTzOQ== Date: Fri, 26 Aug 2022 09:17:41 +0300 From: Jarkko Sakkinen To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, WANG Xuerui , Huacai Chen Subject: Re: [PATCH 5.10 514/545] tpm: eventlog: Fix section mismatch for DEBUG_SECTION_MISMATCH Message-ID: References: <20220819153829.135562864@linuxfoundation.org> <20220819153852.507832822@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220819153852.507832822@linuxfoundation.org> 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,T_SCC_BODY_TEXT_LINE 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 Fri, Aug 19, 2022 at 05:44:44PM +0200, Greg Kroah-Hartman wrote: > From: Huacai Chen > > commit bed4593645366ad7362a3aa7bc0d100d8d8236a8 upstream. > > If DEBUG_SECTION_MISMATCH enabled, __calc_tpm2_event_size() will not be > inlined, this cause section mismatch like this: > > WARNING: modpost: vmlinux.o(.text.unlikely+0xe30c): Section mismatch in reference from the variable L0 to the function .init.text:early_ioremap() > The function L0() references > the function __init early_memremap(). > This is often because L0 lacks a __init > annotation or the annotation of early_ioremap is wrong. > > Fix it by using __always_inline instead of inline for the called-once > function __calc_tpm2_event_size(). > > Fixes: 44038bc514a2 ("tpm: Abstract crypto agile event size calculations") > Cc: stable@vger.kernel.org # v5.3 > Reported-by: WANG Xuerui > Signed-off-by: Huacai Chen > Signed-off-by: Jarkko Sakkinen > Signed-off-by: Greg Kroah-Hartman > --- > include/linux/tpm_eventlog.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/include/linux/tpm_eventlog.h > +++ b/include/linux/tpm_eventlog.h > @@ -157,7 +157,7 @@ struct tcg_algorithm_info { > * Return: size of the event on success, 0 on failure > */ > > -static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, > +static __always_inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event, > struct tcg_pcr_event *event_header, > bool do_mapping) > { > > Thank you. I'll pick this. Reviewed-by: Jarkko Sakkinen BR, Jarkko