summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/Library/BaseLib.h
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2018-08-16 10:38:10 +0800
committerHao Wu <hao.a.wu@intel.com>2018-11-14 09:09:57 +0800
commitdc52d246099c7a4e769b310b5c86bf28801bca6c (patch)
treeda3b8a7dd021ef2195ee493d78407e8b595741e6 /MdePkg/Include/Library/BaseLib.h
parent34a5f0e3e3d2274aa25f0712402ceca86d330f8d (diff)
downloadedk2-dc52d246099c7a4e769b310b5c86bf28801bca6c.tar.gz
edk2-dc52d246099c7a4e769b310b5c86bf28801bca6c.tar.bz2
edk2-dc52d246099c7a4e769b310b5c86bf28801bca6c.zip
UefiCpuPkg/SmmCpuFeaturesLib: [CVE-2017-5715] Stuff RSB before RSM
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1093 Return Stack Buffer (RSB) is used to predict the target of RET instructions. When the RSB underflows, some processors may fall back to using branch predictors. This might impact software using the retpoline mitigation strategy on those processors. This commit will add RSB stuffing logic before returning from SMM (the RSM instruction) to avoid interfering with non-SMM usage of the retpoline technique. After the stuffing, RSB entries will contain a trap like: @SpecTrap: pause lfence jmp @SpecTrap A more detailed explanation of the purpose of commit is under the 'Branch target injection mitigation' section of the below link: https://software.intel.com/security-software-guidance/insights/host-firmware-speculative-execution-side-channel-mitigation Please note that this commit requires further actions (BZ 1091) to remove the duplicated 'StuffRsb.inc' files and merge them into one under a UefiCpuPkg package-level directory (such as UefiCpuPkg/Include/). REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1091 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> (cherry picked from commit 0df5056012e64fdf14cab0cd94e3b8630a3a88ba)
Diffstat (limited to 'MdePkg/Include/Library/BaseLib.h')
0 files changed, 0 insertions, 0 deletions