Skip to content

Commit cec2c6b

Browse files
os-dmergify[bot]
authored andcommitted
MdeModulePkg: Always Initialize Separate Exception Stacks
Following the APs now always initializing separate exception stacks, this commit always initializes a separate exception stack for the BSP as well. Previously, this was only enabled when PcdCpuStackGuard was set. However, even when a stack guard page is not present, stack overflows can still occur and corrupt the stack; if an exception is taken here, it is still valuable to have a separate exception stack for sanity. Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
1 parent 1d6f2f0 commit cec2c6b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,10 @@ DxeMain (
259259
ASSERT_EFI_ERROR (Status);
260260

261261
//
262-
// Setup Stack Guard
262+
// Setup Exception Stack
263263
//
264-
if (PcdGetBool (PcdCpuStackGuard)) {
265-
Status = InitializeSeparateExceptionStacks (NULL, NULL);
266-
ASSERT_EFI_ERROR (Status);
267-
}
264+
Status = InitializeSeparateExceptionStacks (NULL, NULL);
265+
ASSERT_EFI_ERROR (Status);
268266

269267
//
270268
// Initialize Debug Agent to support source level debug in DXE phase

0 commit comments

Comments
 (0)