summaryrefslogtreecommitdiff
path: root/SecurityPkg
diff options
context:
space:
mode:
authorChao Zhang <chao.b.zhang@intel.com>2015-07-15 02:13:22 +0000
committerczhang46 <czhang46@Edk2>2015-07-15 02:13:22 +0000
commit368110120b8266f70924dd15a6d09afcb58767b7 (patch)
tree9c57c9db2959fe5c3cbe932848714d67a882e845 /SecurityPkg
parent68227ac33e998b1a2859d68a5a9b0fa510c10708 (diff)
downloadedk2-platforms-368110120b8266f70924dd15a6d09afcb58767b7.tar.xz
SecurityPkg: Correct BootOrder/Boot#### measurement behavior
Correct the variable measurement behavior to include whole EFI_VARIABLE_DATA structure. It is for the latest spec compliance Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17980 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Tcg/TcgDxe/TcgDxe.c4
-rw-r--r--SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c28
2 files changed, 10 insertions, 22 deletions
diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
index f15e94353c..4b9afe34a4 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 6126bd8761..582f09f99f 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;
}