Change EV_EFI_VARIABLE_BOOT measure behavior. Include VarName, VarGuid to hash 
extend to PCR

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zh...@intel.com>
---
 SecurityPkg/Tcg/TcgDxe/TcgDxe.c   |  4 ++--
 SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c | 28 ++++++++--------------------
 2 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
index f15e943..4b9afe3 100644
--- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
+++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
@@ -959,8 +959,8 @@ MeasureVariable (
 
   Status = TcgDxeHashLogExtendEventI (
              &mTcgDxeData,
-             (UINT8*)VarData,
-             VarSize,
+             (UINT8*)VarLog,
+             TcgEvent.EventSize,
              &TcgEvent,
              (UINT8*)VarLog
              );
diff --git a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c 
b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
index 6126bd8..582f09f 100644
--- a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
+++ b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c
@@ -1206,26 +1206,14 @@ MeasureVariable (
        );
   }
 
-  if (EventType == EV_EFI_VARIABLE_DRIVER_CONFIG) {
-    //
-    // Digest is the event data (EFI_VARIABLE_DATA_TREE)
-    //
-    Status = TcgDxeHashLogExtendEvent (
-               0,
-               (UINT8*)VarLog,
-               TcgEvent.EventSize,
-               &TcgEvent,
-               (UINT8*)VarLog
-               );
-  } else {
-    Status = TcgDxeHashLogExtendEvent (
-               0,
-               (UINT8*)VarData,
-               VarSize,
-               &TcgEvent,
-               (UINT8*)VarLog
-               );
-  }
+  Status = TcgDxeHashLogExtendEvent (
+             0,
+             (UINT8*)VarLog,
+             TcgEvent.EventSize,
+             &TcgEvent,
+             (UINT8*)VarLog
+             );
+
   FreePool (VarLog);
   return Status;
 }
-- 
1.9.5.msysgit.1


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to