From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 A6DE281E8E for ; Thu, 17 Nov 2016 21:47:04 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 17 Nov 2016 21:47:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,655,1473145200"; d="scan'208";a="902785385" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 17 Nov 2016 21:47:09 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 17 Nov 2016 21:47:09 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 17 Nov 2016 21:47:09 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Fri, 18 Nov 2016 13:47:05 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" Thread-Topic: [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent() Thread-Index: AQHSQV6gC7CBEo3VK0S3HhawxXyyZqDeO5DA Date: Fri, 18 Nov 2016 05:47:04 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386D7324@shsmsx102.ccr.corp.intel.com> References: <1479447774-63284-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1479447774-63284-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2016 05:47:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: jiewen.yao@intel.com > -----Original Message----- > From: Zeng, Star > Sent: Friday, November 18, 2016 1:43 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen ; > Zhang, Chao B > Subject: [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent() >=20 > Add comments into LogHashEvent() to describe the usage > of GetDigestListSize (DigestList). >=20 > Cc: Jiewen Yao > Cc: Chao Zhang > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng > --- > SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c > b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c > index 377f8d9fe45b..209d843245e4 100644 > --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c > +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c > @@ -317,6 +317,10 @@ LogHashEvent ( > } > break; > case EFI_TCG2_EVENT_LOG_FORMAT_TCG_2: > + // > + // Use GetDigestListSize (DigestList) in the GUID HOB DataLength > calculation > + // to reserve enough buffer to hold TPML_DIGEST_VALUES > compact binary. > + // > HobData =3D BuildGuidHob ( > &gTcgEvent2EntryHobGuid, > sizeof(TcgPcrEvent2->PCRIndex) + > sizeof(TcgPcrEvent2->EventType) + GetDigestListSize (DigestList) + > sizeof(TcgPcrEvent2->EventSize) + NewEventHdr->EventSize > -- > 2.7.0.windows.1