Skip to content
Closed
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
34 changes: 28 additions & 6 deletions SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,12 +757,10 @@ DxeTpm2MeasureBootHandler (
return EFI_SUCCESS;
}

// MU_CHANGE [BEGIN]
//
// The PE image from unmeasured Firmware volume need be measured
// The PE image from measured Firmware volume will be measured according to policy below.
// If it is driver, do not measure
// If it is application, still measure.
//
// MU_CHANGE [END]
ApplicationRequired = TRUE;

if ((mTcg2CacheMeasuredHandle != Handle) && (mTcg2MeasuredHobData != NULL)) {
Expand Down Expand Up @@ -857,8 +855,10 @@ DxeTpm2MeasureBootHandler (
// Measure only application if Application flag is set
// Measure drivers and applications if Application flag is not set
//
if ((!ApplicationRequired) ||
(ApplicationRequired && (ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION)))
// MU_CHANGE
//if ((!ApplicationRequired) ||
// (ApplicationRequired && (ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION)))
if (!ApplicationRequired)
{
//
// Print the image path to be measured.
Expand Down Expand Up @@ -889,6 +889,28 @@ DxeTpm2MeasureBootHandler (
);
}

// MU_CHANGE [END]
DEBUG_CODE_BEGIN ();
//
// Due to "TCG_SPEC_CHANGE: PCR4_SKIP_FV_APP" applications launched from measured firmware will be skipped
//

if (ApplicationRequired && (ImageContext.ImageType == EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION)) {
CHAR16 *ToText;
ToText = ConvertDevicePathToText (
DevicePathNode,
FALSE,
TRUE
);
if (ToText != NULL) {
DEBUG ((DEBUG_INFO, "TCG_SPEC_CHANGE: PCR4_SKIP_FV_APP -- Skipping: %s.\n", ToText));
FreePool (ToText);
}
}

DEBUG_CODE_END ();
// MU_CHANGE [END]

//
// Done, free the allocated resource.
//
Expand Down
Loading