Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp576582ybt; Fri, 19 Jun 2020 08:32:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5ocHNo+b3fq9Hn4sIHV2tKc9guFxffgP7v30H2rRjvjG3LbcDL35hoMbkI1cKHF5y9pum X-Received: by 2002:a17:906:8401:: with SMTP id n1mr3870041ejx.479.1592580738637; Fri, 19 Jun 2020 08:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592580738; cv=none; d=google.com; s=arc-20160816; b=RfydAaH6rTof2ICI7QLjwkPmYDBZqIQ/twaSkWSAbvHbC251h127je+8CNCr6OdMLH 6+i1L0Op3avWzgFyBhOdiMmqibOx/ZrV+1VH1Ds0C3h0XjAp/xk5fdokGdwktHL3GVZp tYN7rNk/Gm3TRhZmdwRP8OWsHRjlYWuQGR3c9uaisYiRY7R7r7BT1Gn9TKWywc74d9yL JBj1RLTGZb2wWAYHq+hb+Szl1d/loLOiYmd+aa+t8vRfOD3ASEEc4oyrcEIwOjastiv8 cUffZR3Fkgq9qkBrdvx4YjpkyZZ+CUR/Sjn0ZwAzJD/MgD37F4J1UxCSizFgsyK0Zrku Bs1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yXbfselSkfOC+uhm7SQrvU+EmangFdFvHcJp1GXbiG4=; b=ftfpTd925EB0KTpPdB97Ky+KXO2FPIKxL4Ucvv5yiZYDs6/FXrC55Ljw18hhzd58Xz D/FJ6MSAWP6l9GTsH3yN+ByW6440+EnEZTs74OSw/hK/JniDLmyxy3WwqqpYJzMkMq5c 082KGnBBc5d0gQm40wjCLabMZgnz4bVMzzzCGj7+pW06vI6JRefxcKbAEs9lXEl/FEpr Wbv84iqOK+J796GaWVr7oajY3oB69V7/niy8xF38E+yiYXMpHef122B6TBTiHhOO72MS UC3MyHSrSUMOB7meTYVXw10T4uVEKvP1yev7nR4bpN2frrguQIi8N1szwwHwm7FrqTTM 2ObQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xqfi3Kmf; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pj20si3953455ejb.158.2020.06.19.08.31.56; Fri, 19 Jun 2020 08:32:18 -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=Xqfi3Kmf; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393650AbgFSP3f (ORCPT + 99 others); Fri, 19 Jun 2020 11:29:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:32896 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404312AbgFSP3T (ORCPT ); Fri, 19 Jun 2020 11:29:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ACF7B21927; Fri, 19 Jun 2020 15:29:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592580558; bh=RCzbOfWKdsuNjoZhh37a3FIUbTHPuINlTo8uqPP3G9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xqfi3KmfZM8NzVK66zZwWn1WOR0m1cxr/ug20lnw/fcIKFb3NqyrGLP0n9jPE7+CP Ss5ogzXvC6M+QvRu9EqlB13w9oB8YhK14DSlVEYHH1+cbFjAxWlUw+wNSti45cE0qx noSEwVSOuGUbli/GJbdQJU8huo7CtzwPPZWkDa1M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Torvalds , Roberto Sassu Subject: [PATCH 5.7 278/376] ima: Remove __init annotation from ima_pcrread() Date: Fri, 19 Jun 2020 16:33:16 +0200 Message-Id: <20200619141723.494348122@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141710.350494719@linuxfoundation.org> References: <20200619141710.350494719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roberto Sassu commit 8b8c704d913b0fe490af370631a4200e26334ec0 upstream. Commit 6cc7c266e5b4 ("ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init()") added a call to ima_calc_boot_aggregate() so that the digest can be recalculated for the boot_aggregate measurement entry if the 'd' template field has been requested. For the 'd' field, only SHA1 and MD5 digests are accepted. Given that ima_eventdigest_init() does not have the __init annotation, all functions called should not have it. This patch removes __init from ima_pcrread(). Cc: stable@vger.kernel.org Fixes: 6cc7c266e5b4 ("ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init()") Reported-by: Linus Torvalds Signed-off-by: Roberto Sassu Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- security/integrity/ima/ima_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/integrity/ima/ima_crypto.c +++ b/security/integrity/ima/ima_crypto.c @@ -645,7 +645,7 @@ int ima_calc_buffer_hash(const void *buf return calc_buffer_shash(buf, len, hash); } -static void __init ima_pcrread(u32 idx, struct tpm_digest *d) +static void ima_pcrread(u32 idx, struct tpm_digest *d) { if (!ima_tpm_chip) return;