]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg/PiSmmCpuDxeSmm: Use SMM Interrupt Shadow Stack
authorSheng, W <w.sheng@intel.com>
Fri, 12 Nov 2021 01:40:28 +0000 (09:40 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 12 Nov 2021 12:50:19 +0000 (12:50 +0000)
commit455b0347a7c55d3842e87b20259659a22f7e62a5
tree6fdc4bbd12ba2f5943bd5a4ff27e9c91bfe5ead0
parent466ebdd2e0919c1538d03cd59833704bd5e1c028
UefiCpuPkg/PiSmmCpuDxeSmm: Use SMM Interrupt Shadow Stack

When CET shadow stack feature is enabled, it needs to use IST for the
 exceptions, and uses interrupt shadow stack for the stack switch.
Shadow stack should be 32 bytes aligned.
Check IST field, when clear shadow stack token busy bit when using retf.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3728

Signed-off-by: Sheng Wei <w.sheng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c