Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp953587ybz; Wed, 29 Apr 2020 12:19:47 -0700 (PDT) X-Google-Smtp-Source: APiQypIJ11buIvRlOlni1dxj3S0zOb6Ljjgd0K6z6OeZlArERr7/+D5Bhji9GcltEIFdYYFyjZPO X-Received: by 2002:a17:906:548:: with SMTP id k8mr4020980eja.259.1588187987317; Wed, 29 Apr 2020 12:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588187987; cv=none; d=google.com; s=arc-20160816; b=sAXiW9I78AQBZnyFRXvUwdjwKm4/VM3xq8EklT6nKfZZK8sxnT0csiRJaW9/ouvKdp 8dUkILENkTZRHYh0fpLR8Nsy/Fy6s18MhHrTy/n6xqQG7jYsX7atrKrFKqOQY4c0Gh6F hJnaaka+ja2PnBhwHA1HmZ1muTEywCOQYSnd6dZM1svYzR0Ib/czh6AMQuAHMD7YSV1n tLtggiBn/Uo106pBx78DaX88bEQ55AwWZhXPRnisuWz/28w6SPOowXq78uR7g7cQz3dq QPp6DQcVh3hw0f5IIYrZoKSAOneSwfw7pgn/G5oduM0SUOFJwqlb8XUzLmItlsuSoGMN rtKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aUdzkE3xbK/BX5y4+u+C6mfQkXB8gsLhX+03vDYDyVU=; b=euAbJqAu5v+G0d34oS4cxJV3Gp+2in9zWZXbm0eXRGanDgkIq2XH9gRLOjI7f3GcwL Nlsqm02M1cXwayf70PbGpLYAC3hrriX4jVua+AhscHdR7SU2F22lgtlKETNywbisYywf H5i9JtGBp6dBVQhWmuZJW1DFmR43sGuOGywpsOABveXY4q2h04vj/SthlXDONyd7dxF7 1tgr8qWBsa1gHcpCxRXAD7cf+07FTxA8jxvPG9VONaSYJI61JE/XMv7J9oh5wf+NGuY+ MQdeQ1dUFoPfVuvI5+OmDbxj+C4FrlkawGanMifVY86IRr3VnLUxEXaHuIeiwxsd5b6I KCdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CjXDKQe5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si4449368ejr.343.2020.04.29.12.19.23; Wed, 29 Apr 2020 12:19:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CjXDKQe5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727119AbgD2TPd (ORCPT + 99 others); Wed, 29 Apr 2020 15:15:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:52894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726921AbgD2TPd (ORCPT ); Wed, 29 Apr 2020 15:15:33 -0400 Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09F18221EA; Wed, 29 Apr 2020 19:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588187733; bh=8zGF7J5vU1aHCP5NVrkZGLyiOLpTgil37hVC6FyH4+g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CjXDKQe50JwPGFFd2wqJPBv40jTi+sCUJ4DaP44BJ0ffo0qDgF4CCT/up//grV+1X H5XHXUf7VrgTddw49+fLsdqZbguhhBESE0/5YGZddRYiqx0Jo97WEX7mbcnqbaWpIj irEoW5bcty8tZMIKiOKqEusZ2LpinmUtT10U5WJk= Received: by mail-il1-f173.google.com with SMTP id e8so3553189ilm.7; Wed, 29 Apr 2020 12:15:33 -0700 (PDT) X-Gm-Message-State: AGi0PuZ+ljW/oxfpWo3Ry1qNXMbP9fExAPCpODxbdV1xTPROcNRtUrjN ziOtRoYc71d5kEzDvg2Wgph/EW9B0BM7lyV2qT4= X-Received: by 2002:a92:39dd:: with SMTP id h90mr4677889ilf.80.1588187732438; Wed, 29 Apr 2020 12:15:32 -0700 (PDT) MIME-Version: 1.0 References: <20200429190119.43595-1-arnd@arndb.de> In-Reply-To: <20200429190119.43595-1-arnd@arndb.de> From: Ard Biesheuvel Date: Wed, 29 Apr 2020 21:15:21 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] efi/tpm: fix section mismatch warning To: Arnd Bergmann Cc: Ingo Molnar , Jerry Snitselaar , Ard Biesheuvel , Ben Dooks , Dave Young , Jarkko Sakkinen , Lukas Wunner , Lyude Paul , Matthew Garrett , Octavian Purdila , Peter Jones , Peter Zijlstra , Scott Talbert , Thomas Gleixner , linux-efi , linux-integrity@vger.kernel.org, stable@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Apr 2020 at 21:02, Arnd Bergmann wrote: > > Building with gcc-10 causes a harmless warning about a section mismatch: > > WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap() > The function tpm2_calc_event_log_size() references > the function __init early_memunmap(). > This is often because tpm2_calc_event_log_size lacks a __init > annotation or the annotation of early_memunmap is wrong. > > Add the missing annotation. > > Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing") > Signed-off-by: Arnd Bergmann Thanks, I'll take it as a fix. > --- > drivers/firmware/efi/tpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c > index 31f9f0e369b9..55b031d2c989 100644 > --- a/drivers/firmware/efi/tpm.c > +++ b/drivers/firmware/efi/tpm.c > @@ -16,7 +16,7 @@ > int efi_tpm_final_log_size; > EXPORT_SYMBOL(efi_tpm_final_log_size); > > -static int tpm2_calc_event_log_size(void *data, int count, void *size_info) > +static int __init tpm2_calc_event_log_size(void *data, int count, void *size_info) > { > struct tcg_pcr_event2_head *header; > int event_size, size = 0; > -- > 2.26.0 >