Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3949291ybg; Sun, 7 Jun 2020 16:15:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ0aSqD3tFKoE0rJHJijKg2Iw0jFnhknjqBPjDQRvhRMc7ikMx/TAcakGJvhxwjI7vAh0G X-Received: by 2002:a17:906:a402:: with SMTP id l2mr19559544ejz.14.1591571733637; Sun, 07 Jun 2020 16:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591571733; cv=none; d=google.com; s=arc-20160816; b=LNkSDD6xh8MAaVjTjV8XaEVxhe/+5XNjGLQC4bZLOpHBP+NLHx10cw3HPIs/ZXYi4f qDZVDPbrf0m8wShf8V+n3VtAUQbWtmhnABK8cZWp8gsncJi5fy+Dp5bHqe34Xwv1vCBh DI9DzR0gl3NSJhaSW2y5EhSTCFh7Ocg8Sb0LWqz/EB9Oi3SJOGXlAkq8A36GiTPGnM3y 96k4SVhJCGH9+dCQpVbkUXEAjOguZTedbOYdQUNb+D+RadwJG47Y1qslNZrBczNII6N0 Fxvr8eWQX6xHK4lEl4Vdy90IqbGXg9/syRZQw9NbWAhrW4oEVB8lZ6SOMt9reahMW2bC aFbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=KSlntCbluVS76b3g/z4HXEV6a3OnchHRiFcS+IdPIFA=; b=wZfGXBKWRBPKU+GBRMhVmLqqTLrgcszLmD8zXrUiy5+/p1aF+CscFOcqkyYdTlaDlX uaXLb34P8r0IyrfvguuEHJScZsg0uGN79IKxl1QeUy5EjmBhDOwQSf/8MPKZj/B3WF8W N7ZDoFByp9b0kg4G8eUcj5Zjze8z5/Ut6ldByJGKsy6XqfmyUEpuv8+Mrw8+OitRM3qt Ap2LegTb8Z25ZjF34rYPO8AR0zG/R/aWVRiPDxA4xRZdwTPkwXnUWSz+ncIhqyt7XkLe Oe/AzMIphwqQP/rzrqWWcBVONvbBB8HekxD31Ax+nDE1ubI6K5i7yJv1NdQvrUzMGJDn iKEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="jTOe+/uL"; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx19si7511388edb.395.2020.06.07.16.15.10; Sun, 07 Jun 2020 16:15:33 -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=@redhat.com header.s=mimecast20190719 header.b="jTOe+/uL"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727887AbgFGXLU (ORCPT + 99 others); Sun, 7 Jun 2020 19:11:20 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:53279 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726922AbgFGXLT (ORCPT ); Sun, 7 Jun 2020 19:11:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591571477; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=KSlntCbluVS76b3g/z4HXEV6a3OnchHRiFcS+IdPIFA=; b=jTOe+/uLoUSI4w/Kz4Ma2MDq9hIj+KQsL0p2Eae/o9SXvtlMsohX0KFtlXQmFNJXu0xDFh Hc2DxGJmG4YOLF0dCcvPpSPMFgb1bCf1HSwoimw2roJLcAXxIvzMGP+F8XZ//e77clwdS9 xQgLTaTkd0fqDs8toazA8VsU2Nmyc2Q= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-299-RDaSb-S5PaW8BLHYNyWxjg-1; Sun, 07 Jun 2020 19:11:16 -0400 X-MC-Unique: RDaSb-S5PaW8BLHYNyWxjg-1 Received: by mail-qv1-f72.google.com with SMTP id a8so12576669qvt.7 for ; Sun, 07 Jun 2020 16:11:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=KSlntCbluVS76b3g/z4HXEV6a3OnchHRiFcS+IdPIFA=; b=CuKq6KCcSidHpjeMsa2an0pNCWZlV36ASlxqM00SCzAQ0q/iYy9/dNa6XSdW0BSW8j 3wG6bMln/OAiJz6kUFM0hXRuBMuTLhwvNI6rEjmQUqgaqW/JGrkfQtjA1jC2lqGzFG7/ if5/bur4BHmzxB3ojnR0CdRrKKqoJem4KtpnqhwywCPRZ6I7ZO/E7qfThRcUbWr2mccF p5pd4CMSkylQ7C5WU0YMYhNV3rCZOt7YHAYA6sRw9SmdRQaVgt+69eT7QU2tD/p++Pp7 YQKzE31KsIZqU8wm6MwowM1C4iBZhX0fSsLO9O3dU7MV8e+9JQpK294HwGYHQFRTU1+P UZvA== X-Gm-Message-State: AOAM531mFv0bMYl90skftcUA1WnLMlMKudUYVUrc3zvAhUA64qfaqRdU RqqxyJYnoJh3DEYLPPxQ7r5+bc6Eh3Dm3zklv5hheylfvrlMxKDPfjbUFSuNuGLUd2EgAdZQIGc 9OwmB4CDitpIqe9rMYkPiBzm1 X-Received: by 2002:ac8:5648:: with SMTP id 8mr20542600qtt.280.1591571475456; Sun, 07 Jun 2020 16:11:15 -0700 (PDT) X-Received: by 2002:ac8:5648:: with SMTP id 8mr20542575qtt.280.1591571475209; Sun, 07 Jun 2020 16:11:15 -0700 (PDT) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id b4sm5249646qka.133.2020.06.07.16.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2020 16:11:14 -0700 (PDT) Date: Sun, 7 Jun 2020 16:11:13 -0700 From: Jerry Snitselaar To: Roberto Sassu Cc: torvalds@linux-foundation.org, zohar@linux.ibm.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, silviu.vlasceanu@huawei.com, stable@vger.kernel.org Subject: Re: [PATCH] ima: Remove __init annotation from ima_pcrread() Message-ID: <20200607231113.mocsa7wphkpleh7a@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Roberto Sassu , torvalds@linux-foundation.org, zohar@linux.ibm.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, silviu.vlasceanu@huawei.com, stable@vger.kernel.org References: <20200607210029.30601-1-roberto.sassu@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <20200607210029.30601-1-roberto.sassu@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun Jun 07 20, Roberto Sassu wrote: >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 Reviewed-by: Jerry Snitselaar >--- > security/integrity/ima/ima_crypto.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c >index ba5cc3264240..220b14920c37 100644 >--- a/security/integrity/ima/ima_crypto.c >+++ b/security/integrity/ima/ima_crypto.c >@@ -786,7 +786,7 @@ int ima_calc_buffer_hash(const void *buf, loff_t len, > 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; >-- >2.17.1 >