]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
MdeModulePkg/PiSmmCore: Cache CommunicationBuffer info before using it
authorJeff Fan <jeff.fan@intel.com>
Fri, 18 Nov 2016 02:46:43 +0000 (10:46 +0800)
committerJeff Fan <jeff.fan@intel.com>
Tue, 22 Nov 2016 07:22:17 +0000 (15:22 +0800)
commiteaae7b33b1cf6b9f21db1636f219c2b6a8d88afd
treeb7e736f6b63d62f7b6c4823ea241c0aa6f0f32ed
parent01dd077315c6759c94af9af4232f8318db13cf8d
MdeModulePkg/PiSmmCore: Cache CommunicationBuffer info before using it

gSmmCorePrivate->CommunicationBuffer and gSmmCorePrivate->BufferSize locate at
runtime memory region. That means they could be modified by non-SMM code during
runtime.

We should cache them into SMM local variables before we verify them. After
verification, we should use the cached ones directly instead of the ones in
gSmmCorePrivate.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
MdeModulePkg/Core/PiSmmCore/PiSmmCore.c