* [PATCH] SecurityPkg: Initailize variable Status before it is consumed.
@ 2020-09-01 0:55 Zhiguang Liu
2020-09-01 7:02 ` Laszlo Ersek
0 siblings, 1 reply; 4+ messages in thread
From: Zhiguang Liu @ 2020-09-01 0:55 UTC (permalink / raw)
To: devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar, Laszlo Ersek
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2945
V2: Move "Status = EFI_SUCCESS;" before the EDKII_TCG_PRE_HASH check.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
index 0e770f4485..93a8803ff6 100644
--- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
+++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
@@ -456,6 +456,7 @@ HashLogExtendEvent (
if ((Flags & EDKII_TCG_PRE_HASH) != 0 || (Flags & EDKII_TCG_PRE_HASH_LOG_ONLY) != 0) {
ZeroMem (&DigestList, sizeof(DigestList));
CopyMem (&DigestList, HashData, sizeof(DigestList));
+ Status = EFI_SUCCESS;
if ((Flags & EDKII_TCG_PRE_HASH) !=0 ) {
Status = Tpm2PcrExtend (
NewEventHdr->PCRIndex,
--
2.25.1.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] SecurityPkg: Initailize variable Status before it is consumed.
2020-09-01 0:55 [PATCH] SecurityPkg: Initailize variable Status before it is consumed Zhiguang Liu
@ 2020-09-01 7:02 ` Laszlo Ersek
2020-09-01 17:14 ` [edk2-devel] " Laszlo Ersek
0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2020-09-01 7:02 UTC (permalink / raw)
To: Zhiguang Liu, devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar
On 09/01/20 02:55, Zhiguang Liu wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2945
>
> V2: Move "Status = EFI_SUCCESS;" before the EDKII_TCG_PRE_HASH check.
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Qi Zhang <qi1.zhang@intel.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
> ---
> SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> index 0e770f4485..93a8803ff6 100644
> --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
> @@ -456,6 +456,7 @@ HashLogExtendEvent (
> if ((Flags & EDKII_TCG_PRE_HASH) != 0 || (Flags & EDKII_TCG_PRE_HASH_LOG_ONLY) != 0) {
> ZeroMem (&DigestList, sizeof(DigestList));
> CopyMem (&DigestList, HashData, sizeof(DigestList));
> + Status = EFI_SUCCESS;
> if ((Flags & EDKII_TCG_PRE_HASH) !=0 ) {
> Status = Tpm2PcrExtend (
> NewEventHdr->PCRIndex,
>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
I'll let Jiewen or Jian merge this.
Please change the status of TianoCore#2945 to IN_PROGRESS, and link both
versions of this patch into the ticket as well (in a new comment).
Thanks
Laszlo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH] SecurityPkg: Initailize variable Status before it is consumed.
2020-09-01 7:02 ` Laszlo Ersek
@ 2020-09-01 17:14 ` Laszlo Ersek
0 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2020-09-01 17:14 UTC (permalink / raw)
To: Zhiguang Liu, devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar
On 09/01/20 09:02, Laszlo Ersek wrote:
> On 09/01/20 02:55, Zhiguang Liu wrote:
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2945
>>
>> V2: Move "Status = EFI_SUCCESS;" before the EDKII_TCG_PRE_HASH check.
>>
>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>> Cc: Jian J Wang <jian.j.wang@intel.com>
>> Cc: Qi Zhang <qi1.zhang@intel.com>
>> Cc: Rahul Kumar <rahul1.kumar@intel.com>
>> Cc: Laszlo Ersek <lersek@redhat.com>
>> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
>> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
>> ---
>> SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
>> index 0e770f4485..93a8803ff6 100644
>> --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
>> +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
>> @@ -456,6 +456,7 @@ HashLogExtendEvent (
>> if ((Flags & EDKII_TCG_PRE_HASH) != 0 || (Flags & EDKII_TCG_PRE_HASH_LOG_ONLY) != 0) {
>> ZeroMem (&DigestList, sizeof(DigestList));
>> CopyMem (&DigestList, HashData, sizeof(DigestList));
>> + Status = EFI_SUCCESS;
>> if ((Flags & EDKII_TCG_PRE_HASH) !=0 ) {
>> Status = Tpm2PcrExtend (
>> NewEventHdr->PCRIndex,
>>
>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>
> I'll let Jiewen or Jian merge this.
>
> Please change the status of TianoCore#2945 to IN_PROGRESS, and link both
> versions of this patch into the ticket as well (in a new comment).
Merged as commit 46db105b7b77, via
<https://github.com/tianocore/edk2/pull/909>.
BZ updated.
Thanks
Laszlo
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] SecurityPkg: Initailize variable Status before it is consumed.
@ 2020-08-31 8:15 Zhiguang Liu
0 siblings, 0 replies; 4+ messages in thread
From: Zhiguang Liu @ 2020-08-31 8:15 UTC (permalink / raw)
To: devel; +Cc: Jiewen Yao, Jian J Wang, Qi Zhang, Rahul Kumar
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2945
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
index 0e770f4485..5e883f0cc5 100644
--- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
+++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
@@ -449,6 +449,7 @@ HashLogExtendEvent (
EFI_STATUS Status;
TPML_DIGEST_VALUES DigestList;
+ Status = EFI_SUCCESS;
if (GetFirstGuidHob (&gTpmErrorHobGuid) != NULL) {
return EFI_DEVICE_ERROR;
}
--
2.25.1.windows.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-01 17:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-01 0:55 [PATCH] SecurityPkg: Initailize variable Status before it is consumed Zhiguang Liu
2020-09-01 7:02 ` Laszlo Ersek
2020-09-01 17:14 ` [edk2-devel] " Laszlo Ersek
-- strict thread matches above, loose matches on Subject: below --
2020-08-31 8:15 Zhiguang Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox