From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by mx.groups.io with SMTP id smtpd.web11.9384.1634822708367945835 for ; Thu, 21 Oct 2021 06:25:08 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@ibm.com header.s=pp1 header.b=HMooQ/mt; spf=pass (domain: linux.ibm.com, ip: 148.163.156.1, mailfrom: stefanb@linux.ibm.com) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19LBBVmr011539; Thu, 21 Oct 2021 09:25:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=qvKS3uUIOq7r8u9dqaQyq65hceltUir812HRgyU0Qa4=; b=HMooQ/mtC8Or9xgXO5OwP3RaSVxKmRZmrKPy9s0aVKqdQiAjgAqBro1U65X12NMJTkqb qaYK7PzipXUlNuxGrCLIJ24H3+8YCZDtUc2YCB3wei0MGU6/8FSoPtZBj/Jf665P1Q6G 1VeNTlfhPhuhkQq/du5HC/7pIycyDs8Xh76ByIPSYQU5OXTEOLzZq4yfpP3fg1ZDp/w4 OnQunTI/QD9mnCoB2IJYhyt5oBcco9fJwNKrMtwsUjWEdHL3YOewPQ32SRqu4UH4+T5/ 2waTlmSrAjkMxHsDSUu/MbJrZj0NwX5gfZnKxkSXLVVRya6qEQ1r2xcMFCViG+cGG/aL zQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3btthkt331-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Oct 2021 09:25:04 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19LDP4BY018552; Thu, 21 Oct 2021 09:25:04 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3btthkt329-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Oct 2021 09:25:03 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19LDNeOl024057; Thu, 21 Oct 2021 13:25:02 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma04dal.us.ibm.com with ESMTP id 3bqpcdn7tq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Oct 2021 13:25:02 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19LDP1e419661334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Oct 2021 13:25:01 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B1856E058; Thu, 21 Oct 2021 13:25:01 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B2B526E05E; Thu, 21 Oct 2021 13:24:56 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 21 Oct 2021 13:24:56 +0000 (GMT) Subject: Re: [PATCH 4/4] OvmfPkg: add TPM2_SHA1_ENABLE build option To: Gerd Hoffmann , devel@edk2.groups.io Cc: James Bottomley , Min Xu , Jordan Justen , Erdem Aktas , Ard Biesheuvel , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Jiewen Yao , Tom Lendacky , Brijesh Singh References: <20211021122003.2008499-1-kraxel@redhat.com> <20211021122003.2008499-5-kraxel@redhat.com> From: "Stefan Berger" Message-ID: <03a75199-000f-5575-8898-6d9b113f2bee@linux.ibm.com> Date: Thu, 21 Oct 2021 09:24:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20211021122003.2008499-5-kraxel@redhat.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: GyLnUWtLk9Un5bDdjUU9H0dSjgzJUJ1Z X-Proofpoint-GUID: PUGGthb2oXigyvSdd28p7FIkxQC331g7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-21_04,2021-10-21_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1011 mlxscore=0 suspectscore=0 bulkscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110210070 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id 19LBBVmr011539 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 10/21/21 8:20 AM, Gerd Hoffmann wrote: > Allows to compile OVMF without HashInstanceLibSha1, > i.e. no SHA1 hash support in TPM/TCG modules. Does that then mean that the SHA1 bank in a TPM 2 stays untouched,=20 meaning the PCRs there won't get extended even though the bank is there=20 and active? =C2=A0=C2=A0 Stefan > > Signed-off-by: Gerd Hoffmann > --- > OvmfPkg/OvmfTpmComponentsDxe.dsc.inc | 2 ++ > OvmfPkg/OvmfTpmComponentsPei.dsc.inc | 2 ++ > OvmfPkg/OvmfTpmDefines.dsc.inc | 1 + > 3 files changed, 5 insertions(+) > > diff --git a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc b/OvmfPkg/OvmfTpmComp= onentsDxe.dsc.inc > index 6806eb245e2b..1952a848b17c 100644 > --- a/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc > +++ b/OvmfPkg/OvmfTpmComponentsDxe.dsc.inc > @@ -8,7 +8,9 @@ > Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2Devic= eLibRouterDxe.inf > NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.= inf > HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBase= CryptoRouterDxe.inf > +!if $(TPM2_SHA1_ENABLE) =3D=3D TRUE > NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha= 1.inf > +!endif > NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibS= ha256.inf > NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibS= ha384.inf > NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibS= ha512.inf > diff --git a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc b/OvmfPkg/OvmfTpmComp= onentsPei.dsc.inc > index 94bc124f9b78..fbe905603312 100644 > --- a/OvmfPkg/OvmfTpmComponentsPei.dsc.inc > +++ b/OvmfPkg/OvmfTpmComponentsPei.dsc.inc > @@ -13,7 +13,9 @@ > SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { > > HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBase= CryptoRouterPei.inf > +!if $(TPM2_SHA1_ENABLE) =3D=3D TRUE > NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha= 1.inf > +!endif > NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibS= ha256.inf > NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibS= ha384.inf > NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibS= ha512.inf > diff --git a/OvmfPkg/OvmfTpmDefines.dsc.inc b/OvmfPkg/OvmfTpmDefines.ds= c.inc > index de55cbdcf852..7db7ad7e7934 100644 > --- a/OvmfPkg/OvmfTpmDefines.dsc.inc > +++ b/OvmfPkg/OvmfTpmDefines.dsc.inc > @@ -7,3 +7,4 @@ > =20 > # has no effect unless TPM2_ENABLE =3D=3D TRUE > DEFINE TPM1_ENABLE =3D TRUE > + DEFINE TPM2_SHA1_ENABLE =3D TRUE