From 0aac2f777a688a146050bed47753e2dcf801d3c7 Mon Sep 17 00:00:00 2001 From: "Yao, Jiewen" Date: Fri, 22 Feb 2019 21:30:34 +0800 Subject: MdePkg/BaseLib: Add Shadow Stack Support for X86. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1521 This patch adds SSP - shadow stack pointer to JumpBuffer. It will be used for the platform that enabled CET/ShadowStack. We add gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask to control the global enable/disable. Cc: Michael D Kinney Cc: Liming Gao Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yao Jiewen Reviewed-by: Ray Ni Regression-tested-by: Laszlo Ersek --- MdePkg/MdePkg.dec | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'MdePkg/MdePkg.dec') diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index c859b4a511..69a9575a04 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -2087,6 +2087,13 @@ # @Prompt Fixed Debug Message Print Level. gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UINT32|0x30001016 + ## Indicates the control flow enforcement enabling state. + # If enabled, it uses control flow enforcement technology to prevent ROP or JOP.

+ # BIT0 - SMM CET Shadow Stack is enabled.
+ # Other - reserved + # @Prompt Enable control flow enforcement. + gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask|0x0|UINT32|0x30001017 + [PcdsFixedAtBuild,PcdsPatchableInModule] ## Indicates the maximum length of unicode string used in the following # BaseLib functions: StrLen(), StrSize(), StrCmp(), StrnCmp(), StrCpy(), StrnCpy()

-- cgit v1.2.3