MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
: The function InternalIsBufferOverlapped
and SmmIsBufferOutsideSmmValid
are the checker. They validate gSmmCorePrivate->CommunicationBuffer
and gSmmCorePrivate->BufferSize
gSmmCorePrivate->CommunicationBuffer
.gSmmCorePrivate->CommunicationBuffer
and gSmmCorePrivate->BufferSize
to be a local variable, then check and use them, finally sync local variable back to outside SMRAM.BufferSize
is moved to SMRAM by SmmCore, the SMM driver should not check the address for the BufferSize.