Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp43479rwe; Thu, 25 Aug 2022 23:43:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR6TUBtcgCXNdWk4OSlHxvbN0VZ/DY3nzYXjk+lSGOsIebskXLrPxpXVjFRatVMIJNMAfHiw X-Received: by 2002:a17:907:6818:b0:730:825d:7296 with SMTP id qz24-20020a170907681800b00730825d7296mr4693824ejc.21.1661496191204; Thu, 25 Aug 2022 23:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661496191; cv=none; d=google.com; s=arc-20160816; b=lp/Oi6DX5Ev1I9+4ti0QQgLMgZf7/1j1iQKe+z7PF7ApoONRIrQmqibgaODKzWIuwP DJHRR80B688OJZzArz0O1v76RM8ry9Bzoayh3Fq3iwaRBQNXBTw6xOMLw0XK4sY8ZMM9 8LsV6+A6DJ0BoRmmqSUgZ0wufvIkmEMFhNg7uHauF9zqeyoxEe45JBxyeH8KS6ddVgLQ XcZsS5arn0+8jBTesJP0UArjuhYUhE7wvxD77Cp/Dg4rfHTDTiwxJCCv4FANo6vYu7kR s8L1ONpA67mlNB4hRNC4jGyisI40Cc29ZbSe/6ncWIaZvnBwKngskdp7+U7yFf5a1nep sGig== 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=EctPHT1eV8aDUemgAZOoR/kP6iVGht5yTP9wGLm/XjU=; b=zR8Ngtxoq3HEojVdhu1NhhU+2MtnUJlP0nfktaXCisXt5tmRrwOt/e6m21A+mqB0As 2VxZmFZfMkwCLW7/CQHJQSGLn/+tSeaO+piQMa/u7PA5XfUWk2e0igd5HSnZF00UBlK0 1NPYi5jkwfk5/QlpfZpwkFQ+Irc4z8I2K+7vrzN4sY9nDVilVnKhn48ECdzRwGGW6haf +t40g4giGkc79sQz7yarw8YiA/84SpZwkl77482x0/pBxY4Hg77WdhiAVQlYnOizICsC 2J+lhGA33Xb1IRhGHYwoXMefLoCsOMq5rsVOEbiDIT7vm/BWGdOj4XTM9teyiImC/ROr nU5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HVwGxqIa; 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-20020a170907728d00b0073d97715950si796575ejc.29.2022.08.25.23.42.46; Thu, 25 Aug 2022 23:43: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=@kernel.org header.s=k20201202 header.b=HVwGxqIa; 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 S244937AbiHZGST (ORCPT + 99 others); Fri, 26 Aug 2022 02:18:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230517AbiHZGSS (ORCPT ); Fri, 26 Aug 2022 02:18:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2E5AA3D13; Thu, 25 Aug 2022 23:18:17 -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 4DE7C61B1D; Fri, 26 Aug 2022 06:18:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C465C433D7; Fri, 26 Aug 2022 06:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661494696; bh=qKNyN4kqR/6hnbc3qxIrDeI56DGxkVT4LHJGCSA13c8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HVwGxqIaRpZH3Go5bV9yXpW0aozos7VH1F4uHqOvttINeieATr18vNRHnSnVAVn3T 4icT764Lv8CT/wWt/0gX/NxZx33bACkQ1lsXpcZ6+4zFzZAvKkuL3HEj/EcpH+EL+/ qiZcXUM+cF+8xaCXxFZDj0NeZz6gFvAGe1CqmJdghyYEG+jv/8K/nZOp1cHQmdw9p8 U5AZCMEuLIHabvACGzv7Cs52tUbOD20J019QVENHccwzBtnrOPdqDCKZS9gSxey9Xq MSABPmO4PwEQ4lO7vecig0gwh9v7QU6MOBetDBXRAQ6oj0CFP4yMNTH5hxNKiBS9/b iHZ/qYvJRGT+w== Date: Fri, 26 Aug 2022 09:18:09 +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: 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 26, 2022 at 09:17:44AM +0300, Jarkko Sakkinen wrote: > 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 Uh oh, sorry too many emails in one sit. BR, Jarkko