diff options
author | Hao Wu <hao.a.wu@intel.com> | 2018-03-06 19:34:38 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2018-03-07 20:56:42 +0800 |
commit | 7db1458f759c2e22ebb4c66bc61aa5dbae1e5fa1 (patch) | |
tree | db246075f83c6185f533b126eff4a0b407ba9fee /MdeModulePkg/Core/Dxe/DxeMain.inf | |
parent | a10acf0e207ed49cb3bcce14f3de172605df6ce7 (diff) | |
download | edk2-7db1458f759c2e22ebb4c66bc61aa5dbae1e5fa1.tar.gz edk2-7db1458f759c2e22ebb4c66bc61aa5dbae1e5fa1.tar.bz2 edk2-7db1458f759c2e22ebb4c66bc61aa5dbae1e5fa1.zip |
MdeModulePkg/Core: Fix feature conflict between NX and Stack guard
If enabled, NX memory protection feature will mark some types of active
memory as NX (non-executable), which includes the first page of the stack.
This will overwrite the attributes of the first page of the stack if the
stack guard feature is also enabled.
The solution is to override the attributes setting to the first page of
the stack by adding back the 'EFI_MEMORY_RP' attribute when the stack
guard feature is enabled.
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Core/Dxe/DxeMain.inf')
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain.inf | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index 7334780326..d2e7360ed4 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -3,7 +3,7 @@ #
# It provides an implementation of DXE Core that is compliant with DXE CIS.
#
-# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -130,6 +130,7 @@ gEfiPropertiesTableGuid ## SOMETIMES_PRODUCES ## SystemTable
gEfiMemoryAttributesTableGuid ## SOMETIMES_PRODUCES ## SystemTable
gEfiEndOfDxeEventGroupGuid ## SOMETIMES_CONSUMES ## Event
+ gEfiHobMemoryAllocStackGuid ## SOMETIMES_CONSUMES ## SystemTable
[Ppis]
gEfiVectorHandoffInfoPpiGuid ## UNDEFINED # HOB
@@ -198,6 +199,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPageType ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPoolType ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## CONSUMES
# [Hob]
# RESOURCE_DESCRIPTOR ## CONSUMES
|