* [PATCH V1 1/1] SecurityPkg/TdTcg2Dxe: td-guest shall halt when CcMeasurement install fail
@ 2023-02-02 9:04 Min Xu
2023-02-03 0:02 ` Yao, Jiewen
0 siblings, 1 reply; 2+ messages in thread
From: Min Xu @ 2023-02-02 9:04 UTC (permalink / raw)
To: devel; +Cc: Min M Xu, Jiewen Yao, Jian J Wang
From: Min M Xu <min.m.xu@intel.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4335
CcMeasurement protocol is installed when it is supported in a td-guest. If
the installation of the protocol failed, the guest shall go into
CpuDeadLoop. Because the measurement feature is crucial to a td-guest and
it shall stop running immediately at this situation.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
---
SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
index 59341a8c0250..b34da724ac42 100644
--- a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
+++ b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
@@ -2510,6 +2510,12 @@ DriverEntry (
//
// Create event callback to install CC EventLog ACPI Table
EfiCreateProtocolNotifyEvent (&gEfiAcpiTableProtocolGuid, TPL_CALLBACK, InstallAcpiTable, NULL, &Registration);
+ } else {
+ //
+ // Cc measurement feature is crucial to a td-guest and it shall stop running immediately
+ // when it is failed to be installed.
+ DEBUG ((DEBUG_ERROR, "%a: CcMeasurement protocol failed to be installed - %r\n", __FUNCTION__, Status));
+ CpuDeadLoop ();
}
return Status;
--
2.29.2.windows.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V1 1/1] SecurityPkg/TdTcg2Dxe: td-guest shall halt when CcMeasurement install fail
2023-02-02 9:04 [PATCH V1 1/1] SecurityPkg/TdTcg2Dxe: td-guest shall halt when CcMeasurement install fail Min Xu
@ 2023-02-03 0:02 ` Yao, Jiewen
0 siblings, 0 replies; 2+ messages in thread
From: Yao, Jiewen @ 2023-02-03 0:02 UTC (permalink / raw)
To: Xu, Min M, devel@edk2.groups.io; +Cc: Wang, Jian J
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Thursday, February 2, 2023 5:04 PM
> To: devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Wang, Jian J <jian.j.wang@intel.com>
> Subject: [PATCH V1 1/1] SecurityPkg/TdTcg2Dxe: td-guest shall halt when
> CcMeasurement install fail
>
> From: Min M Xu <min.m.xu@intel.com>
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4335
>
> CcMeasurement protocol is installed when it is supported in a td-guest. If
> the installation of the protocol failed, the guest shall go into
> CpuDeadLoop. Because the measurement feature is crucial to a td-guest and
> it shall stop running immediately at this situation.
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> ---
> SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
> b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
> index 59341a8c0250..b34da724ac42 100644
> --- a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
> +++ b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
> @@ -2510,6 +2510,12 @@ DriverEntry (
> //
> // Create event callback to install CC EventLog ACPI Table
> EfiCreateProtocolNotifyEvent (&gEfiAcpiTableProtocolGuid, TPL_CALLBACK,
> InstallAcpiTable, NULL, &Registration);
> + } else {
> + //
> + // Cc measurement feature is crucial to a td-guest and it shall stop running
> immediately
> + // when it is failed to be installed.
> + DEBUG ((DEBUG_ERROR, "%a: CcMeasurement protocol failed to be
> installed - %r\n", __FUNCTION__, Status));
> + CpuDeadLoop ();
> }
>
> return Status;
> --
> 2.29.2.windows.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-03 0:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-02 9:04 [PATCH V1 1/1] SecurityPkg/TdTcg2Dxe: td-guest shall halt when CcMeasurement install fail Min Xu
2023-02-03 0:02 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox