From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D4EE6223522B5 for ; Thu, 8 Mar 2018 10:26:58 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D995406E8B3; Thu, 8 Mar 2018 18:33:13 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-50.rdu2.redhat.com [10.10.120.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 613DA202322A; Thu, 8 Mar 2018 18:33:08 +0000 (UTC) From: Laszlo Ersek To: marcandre.lureau@redhat.com, edk2-devel@lists.01.org Cc: qemu-devel@nongnu.org, javierm@redhat.com, pjones@redhat.com, jiewen.yao@intel.com References: <20180307155746.18526-1-marcandre.lureau@redhat.com> <20180307155746.18526-7-marcandre.lureau@redhat.com> Message-ID: <4394ee6b-d3b3-4208-f052-4aead4638108@redhat.com> Date: Thu, 8 Mar 2018 19:33:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 08 Mar 2018 18:33:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 08 Mar 2018 18:33:14 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [PATCH v2 6/8] ovmf: link with Tcg2Pei module X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 18:26:59 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 03/08/18 19:20, Laszlo Ersek wrote: > On 03/07/18 16:57, marcandre.lureau@redhat.com wrote: >> From: Marc-André Lureau >> >> This module will initialize TPM device, measure reported FVs and BIOS >> version. We keep both SHA-1 and SHA-256 for the TCG 1.2 log format >> compatibility, but the SHA-256 measurements and TCG 2 log format are >> now recommended. >> >> Cc: Laszlo Ersek >> Cc: Stefan Berger >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Marc-André Lureau >> --- >> OvmfPkg/OvmfPkgX64.dsc | 7 +++++++ >> OvmfPkg/OvmfPkgX64.fdf | 1 + >> 2 files changed, 8 insertions(+) > > (1) Please change the subject line to: > > OvmfPkg: include Tcg2Pei module > >> >> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc >> index 64bd6b6a9f08..3fa1a31f4c37 100644 >> --- a/OvmfPkg/OvmfPkgX64.dsc >> +++ b/OvmfPkg/OvmfPkgX64.dsc >> @@ -278,6 +278,8 @@ [LibraryClasses.common.PEIM] >> QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.inf >> >> !if $(TPM2_ENABLE) >> + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf > > (2) Technically this makes sense, but given the fact that we resolve > BaseCryptLib unconditionally for a bunch of other module types, I think > we should do that for PEIMs as well. > >> + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.inf (3) Actually, can you please move this library resolution under "Tcg2Pei.inf"? Every single PEIM that uses this library instance will need us to spell out the individual hash plugins for it anyway. So I think keeping the "hash router" lib instance together with those NULL-class instances is cleaner. Thanks Laszlo >> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf >> !endif >> >> @@ -615,6 +617,11 @@ [Components] >> >> !if $(TPM2_ENABLE) == TRUE >> OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf >> + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { >> + >> + NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf >> + NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf >> + } >> !endif >> >> # >> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf >> index dbafada5226b..c0173e7adf5f 100644 >> --- a/OvmfPkg/OvmfPkgX64.fdf >> +++ b/OvmfPkg/OvmfPkgX64.fdf >> @@ -167,6 +167,7 @@ [FV.PEIFV] >> >> !if $(TPM2_ENABLE) == TRUE >> INF OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf >> +INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf >> !endif >> >> ################################################################################ >> > > Looks good. (The final version should handle the other DSC / FDF files too.) > > Thanks! > Laszlo >