]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Fix Tcg2 SubmitRequestToPreOSFunction() fail in second times.
authorJiewen Yao <jiewen.yao@intel.com>
Thu, 10 Mar 2016 05:44:40 +0000 (21:44 -0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 11 Mar 2016 04:51:19 +0000 (12:51 +0800)
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction()
has check if current request is same as previous.
But it forget check RequestParameter, which causes
second request fail to process, if RequestParameter
is different.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <Jiewen.Yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.c
SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c

index 46fc616d5e7ed3a26f567229a299592ad06392a4..8912ee4108e329e367b5679198fe4d572d650536 100644 (file)
@@ -7,7 +7,7 @@
 \r
   Tpm2ExecutePendingTpmRequest() will receive untrusted input and do validation.\r
 \r
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials \r
 are licensed and made available under the terms and conditions of the BSD License \r
 which accompanies this distribution.  The full text of the license may be found at \r
@@ -1208,7 +1208,8 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
     return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;\r
   }\r
 \r
-  if (PpData.PPRequest != OperationRequest) {\r
+  if ((PpData.PPRequest != OperationRequest) ||\r
+      (PpData.PPRequestParameter != RequestParameter)) {\r
     PpData.PPRequest = (UINT8)OperationRequest;\r
     PpData.PPRequestParameter = RequestParameter;\r
     DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE);\r
index 360df720de3e1e315a788e5e293fd3766146d003..081ec6c00c55cc042491561c6a4678021fa4a6cf 100644 (file)
@@ -10,7 +10,7 @@
   Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction() and Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction()\r
   will receive untrusted input and do validation.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials \r
 are licensed and made available under the terms and conditions of the BSD License \r
 which accompanies this distribution.  The full text of the license may be found at \r
@@ -134,7 +134,8 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
     return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;\r
   }\r
 \r
-  if (PpData.PPRequest != OperationRequest) {\r
+  if ((PpData.PPRequest != OperationRequest) ||\r
+      (PpData.PPRequestParameter != RequestParameter)) {\r
     PpData.PPRequest = (UINT8)OperationRequest;\r
     PpData.PPRequestParameter = RequestParameter;\r
     DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE);\r