public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"min.m.xu@intel.com" <min.m.xu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Zhiguang Liu <zhiguang.liu@intel.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>, Ken Lu <ken.lu@intel.com>,
	nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH V2 0/3] Introduce TdProtocol into EDK2
Date: Tue, 12 Oct 2021 15:26:50 +0000	[thread overview]
Message-ID: <328B3E43-AAF8-461E-B988-D00608D6544B@arm.com> (raw)
In-Reply-To: <cover.1633661591.git.min.m.xu@intel.com>

Hi Min,

Thank you for this patch.

I think it would greatly help if the EFI_TD_PROTOCOL is changed to something more architecture neutral. As I understand, this patch series is removing the dependency on TPM for measurement and is instead providing a lightweight interface for extending measurements for Confidential Compute Architecture (CCA) guests.

Considering this, it would be good to generalise EFI_TD_PROTOCOL as a Confidential Compute Architecture Measurement (CCAM) protocol.
In fact, your v2 series demonstrates this need with the introduction of MEASURE_BOOT_PROTOCOLS in "[PATCH V2 2/3] SecurityPkg: Support TdProtocol in DxeTpm2MeasureBootLib [https://edk2.groups.io/g/devel/message/81651]".

As it stands, I feel most of the code can be reused/common.  Some interfaces may need to use an architecture specific library, and some configuration options would need to be defined using PCDs.

Kindly let me know your thoughts.

Regards,

Sami Mujawar

On 08/10/2021, 06:24, "devel@edk2.groups.io on behalf of Min Xu via groups.io" <devel@edk2.groups.io on behalf of min.m.xu=intel.com@groups.io> wrote:

    BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3625

    If TD-Guest firmware supports measurement and an event is created,
    TD-Guest firmware is designed to report the event log with the same data
    structure in TCG-Platform-Firmware-Profile specification with
    EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 format.

    The TD-Guest firmware supports measurement, the TD Guest Firmware is
    designed to produce EFI_TD_PROTOCOL with new GUID EFI_TD_PROTOCOL_GUID
    to report event log and provides hash capability.

    https://software.intel.com/content/dam/develop/external/us/en/documents/
    intel-tdx-guest-hypervisor-communication-interface-1.0-344426-002.pdf
    Section 4.3.2 includes the EFI_TD_PROTOCOL.

    Patch #1:
    Introduce the TD Protocol definition into MdePkg

    Patch #2:
    Update DxeTpm2MeasureBootLib to support TD based measure boot.

    Patch #3:
    Update DxeTpmMeasurementLib to support TD based measurement.

    Code is at https://github.com/mxu9/edk2/tree/td_protocol.v2

    v2 changes:
     - TD based measure boot is implemented in DxeTpm2MeasureBootLib.
       This minimize the code changes.
     - TD based measurement is added. It is implemented in
       DxeTpmMeasurementLib.
     - Fix the typo in comments.

    Cc: Michael D Kinney <michael.d.kinney@intel.com>
    Cc: Liming Gao <gaoliming@byosoft.com.cn>
    Cc: Zhiguang Liu <zhiguang.liu@intel.com>
    Cc: Jiewen Yao <jiewen.yao@intel.com>
    Cc: Jian J Wang <jian.j.wang@intel.com>
    Cc: Ken Lu <ken.lu@intel.com>
    Signed-off-by: Min Xu <min.m.xu@intel.com>

    Min Xu (3):
      MdePkg: Introduce TdProtocol for TD-Guest firmware
      SecurityPkg: Support TdProtocol in DxeTpm2MeasureBootLib
      SecurityPkg: Support TdProtocol in DxeTpmMeasurementLib

     MdePkg/Include/Protocol/TdProtocol.h          | 305 +++++++++++++++
     MdePkg/MdePkg.dec                             |   3 +
     .../DxeTpm2MeasureBootLib.c                   | 346 ++++++++++++++----
     .../DxeTpm2MeasureBootLib.inf                 |   1 +
     .../DxeTpmMeasurementLib.c                    |  87 ++++-
     .../DxeTpmMeasurementLib.inf                  |   1 +
     6 files changed, 672 insertions(+), 71 deletions(-)
     create mode 100644 MdePkg/Include/Protocol/TdProtocol.h

    -- 
    2.29.2.windows.2



    




  parent reply	other threads:[~2021-10-12 15:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  5:21 [PATCH V2 0/3] Introduce TdProtocol into EDK2 Min Xu
2021-10-08  5:21 ` [PATCH V2 1/3] MdePkg: Introduce TdProtocol for TD-Guest firmware Min Xu
2021-10-11  1:37   ` 回复: " gaoliming
2021-10-19 13:21   ` [edk2-devel] " Sami Mujawar
2021-10-19 14:40     ` Yao, Jiewen
2021-10-20  9:26       ` Sami Mujawar
2021-10-08  5:21 ` [PATCH V2 2/3] SecurityPkg: Support TdProtocol in DxeTpm2MeasureBootLib Min Xu
2021-10-19 13:22   ` [edk2-devel] " Sami Mujawar
2021-10-27  5:19     ` Min Xu
2021-11-01 13:35       ` Sami Mujawar
2021-10-08  5:21 ` [PATCH V2 3/3] SecurityPkg: Support TdProtocol in DxeTpmMeasurementLib Min Xu
2021-10-19 13:24   ` [edk2-devel] " Sami Mujawar
2021-10-12 15:26 ` Sami Mujawar [this message]
2021-10-14  5:41   ` [edk2-devel] [PATCH V2 0/3] Introduce TdProtocol into EDK2 Min Xu
2021-10-14 11:59     ` Yao, Jiewen
     [not found]     ` <16ADE3D948B3147A.7007@groups.io>
2021-10-14 13:43       ` Yao, Jiewen
2021-10-18 12:59         ` Sami Mujawar
2021-10-18 13:06           ` Yao, Jiewen
2021-10-19  9:51             ` Sami Mujawar
2021-10-19 13:06               ` Min Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=328B3E43-AAF8-461E-B988-D00608D6544B@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox