Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use StackCheckLibNull in SEC and PEI, Define ARM Stack Check Version, Move Stack Check Defines to MdeLibs.dsc.inc #692

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion MdePkg/MdeLibs.dsc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@
SmmCpuRendezvousLib|MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf

# MU_CHANGE [BEGIN] - Add Stack Cookie Support
[LibraryClasses.X64.SEC, LibraryClasses.X64.PEIM, LibraryClasses.X64.PEI_CORE, LibraryClasses.X64.SMM_CORE, LibraryClasses.X64.DXE_SMM_DRIVER, LibraryClasses.X64.MM_CORE_STANDALONE, LibraryClasses.X64.MM_STANDALONE, LibraryClasses.X64.DXE_CORE, LibraryClasses.X64.DXE_DRIVER, LibraryClasses.X64.DXE_RUNTIME_DRIVER, LibraryClasses.X64.DXE_SAL_DRIVER, LibraryClasses.X64.UEFI_DRIVER, LibraryClasses.X64.UEFI_APPLICATION]
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf

[LibraryClasses.ARM, LibraryClasses.AARCH64]
NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf

[LibraryClasses.X64.SMM_CORE, LibraryClasses.X64.DXE_SMM_DRIVER, LibraryClasses.X64.MM_CORE_STANDALONE, LibraryClasses.X64.MM_STANDALONE, LibraryClasses.X64.DXE_CORE, LibraryClasses.X64.DXE_DRIVER, LibraryClasses.X64.DXE_RUNTIME_DRIVER, LibraryClasses.X64.DXE_SAL_DRIVER, LibraryClasses.X64.UEFI_DRIVER, LibraryClasses.X64.UEFI_APPLICATION]
NULL|MdePkg/Library/StackCheckLib/StackCheckLib.inf
StackCheckFailureLib|MdePkg/Library/StackCheckFailureLibNull/StackCheckFailureLibNull.inf

[LibraryClasses.X64.SEC, LibraryClasses.X64.PEIM, LibraryClasses.X64.PEI_CORE]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[LibraryClasses.X64.SEC, LibraryClasses.X64.PEIM, LibraryClasses.X64.PEI_CORE]
[LibraryClasses.common.SEC, LibraryClasses.common.PEIM, LibraryClasses.common.PEI_CORE]

Should this include IA32 and X64?

NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf
StackCheckFailureLib|MdePkg/Library/StackCheckFailureLibNull/StackCheckFailureLibNull.inf
# MU_CHANGE [END] - Add Stack Cookie Support
2 changes: 0 additions & 2 deletions MdePkg/MdePkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@
MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf
# MU_CHANGE [END] - Add Stack Cookie Support



# MS_CHANGE Begin
!if $(TOOLCHAIN) == VS2017 or $(TOOLCHAIN) == VS2019 or $(TOOLCHAIN) == VS2022
[Components.IA32]
Expand Down
13 changes: 1 addition & 12 deletions NetworkPkg/SharedNetworking/SharedNetworkPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@
NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
NETWORK_SNP_ENABLE = TRUE
!include NetworkPkg/NetworkDefines.dsc.inc


## MU_CHANGE Begin
[LibraryClasses.ARM, LibraryClasses.AARCH64]
NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
## MU_CHANGE End
!include MdePkg/MdeLibs.dsc.inc # MU_CHANGE: Add Stack Cookie Support

[LibraryClasses]
!include NetworkPkg/NetworkLibs.dsc.inc
Expand Down Expand Up @@ -80,12 +75,6 @@
BaseCryptLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/SmmCryptLib.inf
TlsLib|CryptoPkg/Library/BaseCryptLibOnProtocolPpi/SmmCryptLib.inf

# MU_CHANGE [BEGIN] - Add Stack Cookie Support
[LibraryClasses.X64]
NULL|MdePkg/Library/StackCheckLib/StackCheckLib.inf
StackCheckFailureLib|MdePkg/Library/StackCheckFailureLibNull/StackCheckFailureLibNull.inf
# MU_CHANGE [END] - Add Stack Cookie Support

[LibraryClasses.DXE_RUNTIME_DRIVER, LibraryClasses.DXE_CORE]
DebugLib|MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortProtocol.inf
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
Expand Down
9 changes: 2 additions & 7 deletions PolicyServicePkg/PolicyServicePkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
BUILD_TARGETS = DEBUG|RELEASE|NOOPT
SKUID_IDENTIFIER = DEFAULT

!include MdePkg/MdeLibs.dsc.inc # MU_CHANGE: Add Stack Cookie Support

[LibraryClasses.common]
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
Expand All @@ -34,13 +36,6 @@
UnitTestPersistenceLib|UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.inf
UnitTestResultReportLib|UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.inf

# MU_CHANGE [BEGIN] - Add Stack Cookie Support
[LibraryClasses.X64]
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
NULL|MdePkg/Library/StackCheckLib/StackCheckLib.inf
StackCheckFailureLib|MdePkg/Library/StackCheckFailureLibNull/StackCheckFailureLibNull.inf
# MU_CHANGE [END] - Add Stack Cookie Support

[LibraryClasses.ARM, LibraryClasses.AARCH64]
NULL|MdePkg/Library/CompilerIntrinsicsLib/ArmCompilerIntrinsicsLib.inf
NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
Expand Down
8 changes: 1 addition & 7 deletions UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
##

!include UnitTestFrameworkPkg/UnitTestFrameworkPkgCommon.dsc.inc
!include MdePkg/MdeLibs.dsc.inc # MU_CHANGE: Add Stack Cookie Support

[LibraryClasses]
#
Expand All @@ -27,13 +28,6 @@

UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.inf

# MU_CHANGE [BEGIN] - Add Stack Cookie Support
[LibraryClasses.X64]
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
NULL|MdePkg/Library/StackCheckLib/StackCheckLib.inf
StackCheckFailureLib|MdePkg/Library/StackCheckFailureLibNull/StackCheckFailureLibNull.inf
# MU_CHANGE [END] - Add Stack Cookie Support

[LibraryClasses.ARM, LibraryClasses.AARCH64]
#
# It is not possible to prevent ARM compiler calls to generic intrinsic functions.
Expand Down
Loading