Skip to content

Commit

Permalink
SecurityPkg: Restore DeviceSecurity (and libspdm submodule)
Browse files Browse the repository at this point in the history
Reverts the following commit:

"SecurityPkg: Temporarily remove DeviceSecurity (and libspdm) from build"
(11506d5)

The libspdm submodule is updated in the following commit to use a
cmocka from a more reliable host (GitLab). This revert is necessary
for that cherry-pick from edk2 to apply.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
  • Loading branch information
makubacki committed May 30, 2024
1 parent 4e71706 commit cd634d6
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 79 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "SecurityPkg/DeviceSecurity/SpdmLib/libspdm"]
path = SecurityPkg/DeviceSecurity/SpdmLib/libspdm
url = https://github.com/DMTF/libspdm.git
8 changes: 1 addition & 7 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@
# Ignore cloned dependencies
/MU_BASECORE

# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
# Ignore libspdm submodule
# /SecurityPkg/DeviceSecurity/SpdmLib/libspdm
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
/SecurityPkg/DeviceSecurity/SpdmLib/libspdm
10 changes: 2 additions & 8 deletions .pytool/CISettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,8 @@ def GetRequiredSubmodules(self):
If no RequiredSubmodules return an empty iterable
'''
rs = []
# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
# rs.append(RequiredSubmodule(
# "SecurityPkg/DeviceSecurity/SpdmLib/libspdm", False))
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
rs.append(RequiredSubmodule(
"SecurityPkg/DeviceSecurity/SpdmLib/libspdm", False))
return rs

def GetName(self):
Expand Down
1 change: 1 addition & 0 deletions SecurityPkg/DeviceSecurity/SpdmLib/libspdm
Submodule libspdm added at 999ed7
30 changes: 5 additions & 25 deletions SecurityPkg/SecurityPkg.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,7 @@
},
"DscCompleteCheck": {
"DscPath": "SecurityPkg.dsc",
"IgnoreInf": [
# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
SecurityPkg/DeviceSecurity/**
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
]
"IgnoreInf": []
},
## options defined .pytool/Plugin/HostUnitTestDscCompleteCheck
"HostUnitTestDscCompleteCheck": {
Expand All @@ -94,13 +86,7 @@
"LibraryClassCheck": {
"IgnoreHeaderFile": [
"DeviceSecurity/SpdmLib/Include/library",
# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
# "DeviceSecurity/SpdmLib/libspdm/include/library",
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
"DeviceSecurity/SpdmLib/libspdm/include/library",
],
"skip": True
},
Expand Down Expand Up @@ -162,15 +148,9 @@
"loongson"
],
"IgnoreStandardPaths": [], # Standard Plugin defined paths that should be ignore
# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
# "IgnoreFiles": [
# "DeviceSecurity/SpdmLib/libspdm"
# ],
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
"IgnoreFiles": [
"DeviceSecurity/SpdmLib/libspdm"
],
"AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported)
},

Expand Down
8 changes: 1 addition & 7 deletions SecurityPkg/SecurityPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@

[Includes.Common.Private]
DeviceSecurity/SpdmLib/Include
# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
# DeviceSecurity/SpdmLib/libspdm/include
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka
# submodule in the libspdm submodule is stable
# (on github)
DeviceSecurity/SpdmLib/libspdm/include

[LibraryClasses]
## @libraryclass Provides hash interfaces from different implementations.
Expand Down
56 changes: 24 additions & 32 deletions SecurityPkg/SecurityPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,18 @@
SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.inf
TdxLib|MdePkg/Library/TdxLib/TdxLib.inf
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka submodule in the
# libspdm submodule is stable (on github)
# SpdmSecurityLib|SecurityPkg/DeviceSecurity/SpdmSecurityLib/SpdmSecurityLib.inf
# SpdmDeviceSecretLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmDeviceSecretLibNull.inf
# SpdmCryptLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmCryptLib.inf
# SpdmCommonLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmCommonLib.inf
# SpdmRequesterLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmRequesterLib.inf
# SpdmResponderLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmResponderLib.inf
# SpdmSecuredMessageLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmSecuredMessageLib.inf
# SpdmTransportMctpLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportMctpLib.inf
# SpdmTransportPciDoeLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportPciDoeLib.inf
# CryptlibWrapper|SecurityPkg/DeviceSecurity/OsStub/CryptlibWrapper/CryptlibWrapper.inf
# PlatformLibWrapper|SecurityPkg/DeviceSecurity/OsStub/PlatformLibWrapper/PlatformLibWrapper.inf
# MemLibWrapper|SecurityPkg/DeviceSecurity/OsStub/MemLibWrapper/MemLibWrapper.inf
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka submodule in the
# libspdm submodule is stable (on github)
SpdmSecurityLib|SecurityPkg/DeviceSecurity/SpdmSecurityLib/SpdmSecurityLib.inf
SpdmDeviceSecretLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmDeviceSecretLibNull.inf
SpdmCryptLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmCryptLib.inf
SpdmCommonLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmCommonLib.inf
SpdmRequesterLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmRequesterLib.inf
SpdmResponderLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmResponderLib.inf
SpdmSecuredMessageLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmSecuredMessageLib.inf
SpdmTransportMctpLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportMctpLib.inf
SpdmTransportPciDoeLib|SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportPciDoeLib.inf
CryptlibWrapper|SecurityPkg/DeviceSecurity/OsStub/CryptlibWrapper/CryptlibWrapper.inf
PlatformLibWrapper|SecurityPkg/DeviceSecurity/OsStub/PlatformLibWrapper/PlatformLibWrapper.inf
MemLibWrapper|SecurityPkg/DeviceSecurity/OsStub/MemLibWrapper/MemLibWrapper.inf
OemTpm2InitLib|SecurityPkg/Library/OemTpm2InitLibNull/OemTpm2InitLib.inf ## MS_CHANGE_?
SourceDebugEnabledLib|SourceLevelDebugPkg/Library/SourceDebugEnabled/SourceDebugEnabledLib.inf ## MS_CHANGE_?
Hash2CryptoLib|SecurityPkg/Library/BaseHash2CryptoLibNull/BaseHash2CryptoLibNull.inf ## MU_CHANGE
Expand Down Expand Up @@ -318,22 +314,18 @@
#
# SPDM
#
# MU_CHANGE [BEGIN]: Remove SPDM from the build until the cmocka submodule in the
# libspdm submodule is stable (on github)
# SecurityPkg/DeviceSecurity/SpdmSecurityLib/SpdmSecurityLib.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmDeviceSecretLibNull.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmCryptLib.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmCommonLib.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmRequesterLib.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmResponderLib.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmSecuredMessageLib.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportMctpLib.inf
# SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportPciDoeLib.inf
# SecurityPkg/DeviceSecurity/OsStub/CryptlibWrapper/CryptlibWrapper.inf
# SecurityPkg/DeviceSecurity/OsStub/PlatformLibWrapper/PlatformLibWrapper.inf
# SecurityPkg/DeviceSecurity/OsStub/MemLibWrapper/MemLibWrapper.inf
# MU_CHANGE [END]: Remove SPDM from the build until the cmocka submodule in the
# libspdm submodule is stable (on github)
SecurityPkg/DeviceSecurity/SpdmSecurityLib/SpdmSecurityLib.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmDeviceSecretLibNull.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmCryptLib.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmCommonLib.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmRequesterLib.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmResponderLib.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmSecuredMessageLib.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportMctpLib.inf
SecurityPkg/DeviceSecurity/SpdmLib/SpdmTransportPciDoeLib.inf
SecurityPkg/DeviceSecurity/OsStub/CryptlibWrapper/CryptlibWrapper.inf
SecurityPkg/DeviceSecurity/OsStub/PlatformLibWrapper/PlatformLibWrapper.inf
SecurityPkg/DeviceSecurity/OsStub/MemLibWrapper/MemLibWrapper.inf

[Components.IA32, Components.X64]
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
Expand Down

0 comments on commit cd634d6

Please sign in to comment.