diff options
4 files changed, 19 insertions, 13 deletions
diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c index 1448af8555..3539206afc 100644 --- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c +++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c @@ -2,6 +2,7 @@ This is a NULL library instance that leverages the VarCheck interface
and the business logic behind the VariablePolicy code to make its decisions.
+Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -105,13 +106,15 @@ VarCheckPolicyLibMmiHandler ( return EFI_INVALID_PARAMETER;
}
- // Make sure that the buffer does not overlap SMM.
+ //
+ // Make sure that the buffer is valid.
// This should be covered by the SmiManage infrastructure, but just to be safe...
+ //
InternalCommBufferSize = *CommBufferSize;
if ((InternalCommBufferSize > VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE) ||
- !VarCheckPolicyIsBufferOutsideValid ((UINTN)CommBuffer, (UINT64)InternalCommBufferSize))
+ !VarCheckPolicyIsPrimaryBufferValid ((UINTN)CommBuffer, (UINT64)InternalCommBufferSize))
{
- DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __func__, CommBuffer, InternalCommBufferSize));
+ DEBUG ((DEBUG_ERROR, "%a - Invalid Primary Buffer (CommBuffer) supplied! 0x%016lX[0x%016lX]\n", __func__, CommBuffer, InternalCommBufferSize));
return EFI_INVALID_PARAMETER;
}
diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.h b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.h index 2226c8a19f..5f89f1e285 100644 --- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.h +++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.h @@ -2,6 +2,7 @@ This internal header file defines the common interface of constructor for
VarCheckPolicyLib.
+Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) Microsoft Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -24,17 +25,17 @@ VarCheckPolicyLibCommonConstructor ( );
/**
- This function is wrapper function to validate the buffer.
+ This function is wrapper function to validate the Primary Buffer (CommBuffer).
@param Buffer The buffer start address to be checked.
@param Length The buffer length to be checked.
- @retval TRUE This buffer is valid per processor architecture and not overlap with SMRAM/MMRAM.
- @retval FALSE This buffer is not valid per processor architecture or overlap with SMRAM/MMRAM.
+ @retval TRUE This buffer is valid.
+ @retval FALSE This buffer is not valid.
**/
BOOLEAN
EFIAPI
-VarCheckPolicyIsBufferOutsideValid (
+VarCheckPolicyIsPrimaryBufferValid (
IN EFI_PHYSICAL_ADDRESS Buffer,
IN UINT64 Length
);
diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibStandaloneMm.c b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibStandaloneMm.c index 784a2422aa..f93ad7e7c0 100644 --- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibStandaloneMm.c +++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibStandaloneMm.c @@ -1,6 +1,7 @@ /** @file -- VarCheckPolicyLibStandaloneMm.c
This is an instance of a VarCheck lib constructor for Standalone MM.
+Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) Microsoft Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -31,17 +32,17 @@ VarCheckPolicyLibStandaloneConstructor ( }
/**
- This function is wrapper function to validate the buffer.
+ This function is wrapper function to validate the Primary Buffer (CommBuffer).
@param Buffer The buffer start address to be checked.
@param Length The buffer length to be checked.
- @retval TRUE This buffer is valid per processor architectureand not overlap with MMRAM.
- @retval FALSE This buffer is not valid per processor architecture or overlap with MMRAM.
+ @retval TRUE This buffer is valid.
+ @retval FALSE This buffer is not valid.
**/
BOOLEAN
EFIAPI
-VarCheckPolicyIsBufferOutsideValid (
+VarCheckPolicyIsPrimaryBufferValid (
IN EFI_PHYSICAL_ADDRESS Buffer,
IN UINT64 Length
)
diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibTraditional.c b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibTraditional.c index 07bead2724..36dccefdd9 100644 --- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibTraditional.c +++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibTraditional.c @@ -1,6 +1,7 @@ /** @file -- VarCheckPolicyLibTraditional.c
This is an instance of a VarCheck lib constructor for traditional SMM.
+Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
Copyright (c) Microsoft Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -31,7 +32,7 @@ VarCheckPolicyLibTraditionalConstructor ( }
/**
- This function is wrapper function to validate the buffer.
+ This function is wrapper function to validate the Primary Buffer (CommBuffer).
@param Buffer The buffer start address to be checked.
@param Length The buffer length to be checked.
@@ -41,7 +42,7 @@ VarCheckPolicyLibTraditionalConstructor ( **/
BOOLEAN
EFIAPI
-VarCheckPolicyIsBufferOutsideValid (
+VarCheckPolicyIsPrimaryBufferValid (
IN EFI_PHYSICAL_ADDRESS Buffer,
IN UINT64 Length
)
|