From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDB34ECDE44 for ; Tue, 30 Oct 2018 19:52:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDCB22081B for ; Tue, 30 Oct 2018 19:52:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDCB22081B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727805AbeJaErt (ORCPT ); Wed, 31 Oct 2018 00:47:49 -0400 Received: from mga07.intel.com ([134.134.136.100]:12605 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbeJaErt (ORCPT ); Wed, 31 Oct 2018 00:47:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2018 12:52:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,445,1534834800"; d="scan'208";a="103883078" Received: from anumodth-mobl.gar.corp.intel.com ([10.249.254.57]) by fmsmga001.fm.intel.com with ESMTP; 30 Oct 2018 12:52:48 -0700 Date: Tue, 30 Oct 2018 21:52:45 +0200 (EET) From: Jarkko Sakkinen X-X-Sender: jsakkine@jsakkine-mobl1 To: Roberto Sassu cc: jarkko.sakkinen@linux.intel.com, zohar@linux.ibm.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, silviu.vlasceanu@huawei.com Subject: Re: [PATCH v3 5/5] tpm: ensure that output of PCR read contains the correct digest size In-Reply-To: <20181030154711.2782-6-roberto.sassu@huawei.com> Message-ID: References: <20181030154711.2782-1-roberto.sassu@huawei.com> <20181030154711.2782-6-roberto.sassu@huawei.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 Oct 2018, Roberto Sassu wrote: > This patch ensures that the digest size returned by the TPM during a PCR > read matches the size of the algorithm passed as argument to > tpm2_pcr_read(). The check is performed after information about the PCR > banks has been retrieved. > > Signed-off-by: Roberto Sassu What is the scenarion when this can happen (should be explained in the commit message)? /Jarkko