Fix the return status when physical presence variable and MemoryOverwriteRequestControl variable are corrupt.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dong Guo <guo.dong@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15329 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.
|
||||
|
||||
Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -68,6 +68,8 @@ PhysicalPresenceCallback (
|
||||
&PpData
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
mTcgNvs->PhysicalPresence.ReturnCode = PP_SUBMIT_REQUEST_GENERAL_FAILURE;
|
||||
DEBUG ((EFI_D_ERROR, "[TPM] Get PP variable failure! Status = %r\n", Status));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -116,6 +118,7 @@ PhysicalPresenceCallback (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
mTcgNvs->PhysicalPresence.ReturnCode = PP_SUBMIT_REQUEST_GENERAL_FAILURE;
|
||||
DEBUG ((EFI_D_ERROR, "[TPM] Get PP flags failure! Status = %r\n", Status));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -226,6 +229,8 @@ MemoryClearCallback (
|
||||
&MorControl
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;
|
||||
DEBUG ((EFI_D_ERROR, "[TPM] Get MOR variable failure! Status = %r\n", Status));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -245,6 +250,7 @@ MemoryClearCallback (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;
|
||||
DEBUG ((EFI_D_ERROR, "[TPM] Set MOR variable failure! Status = %r\n", Status));
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
Reference in New Issue
Block a user