* [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent()
@ 2016-11-18 5:42 Star Zeng
2016-11-18 5:47 ` Yao, Jiewen
0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2016-11-18 5:42 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Jiewen Yao, Chao Zhang
Add comments into LogHashEvent() to describe the usage
of GetDigestListSize (DigestList).
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 ++++
1 file changed, 4 insertions(+)
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 = BuildGuidHob (
&gTcgEvent2EntryHobGuid,
sizeof(TcgPcrEvent2->PCRIndex) + sizeof(TcgPcrEvent2->EventType) + GetDigestListSize (DigestList) + sizeof(TcgPcrEvent2->EventSize) + NewEventHdr->EventSize
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent()
2016-11-18 5:42 [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent() Star Zeng
@ 2016-11-18 5:47 ` Yao, Jiewen
0 siblings, 0 replies; 2+ messages in thread
From: Yao, Jiewen @ 2016-11-18 5:47 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Zhang, Chao B
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 <star.zeng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Zhang, Chao B <chao.b.zhang@intel.com>
> Subject: [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent()
>
> Add comments into LogHashEvent() to describe the usage
> of GetDigestListSize (DigestList).
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> 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 = BuildGuidHob (
> &gTcgEvent2EntryHobGuid,
> sizeof(TcgPcrEvent2->PCRIndex) +
> sizeof(TcgPcrEvent2->EventType) + GetDigestListSize (DigestList) +
> sizeof(TcgPcrEvent2->EventSize) + NewEventHdr->EventSize
> --
> 2.7.0.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-18 5:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-18 5:42 [PATCH] SecurityPkg Tcg2Pei: Add comments into LogHashEvent() Star Zeng
2016-11-18 5:47 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox