From: "Xing, Cedric" <cedric.xing@intel.com>
To: Alexander Graf <graf@amazon.com>,
Dan Williams <dan.j.williams@intel.com>,
Samuel Ortiz <sameo@rivosinc.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Lukas Wunner <lukas@wunner.de>,
Dionna Amalie Glaze <dionnaglaze@google.com>,
Qinkun Bao <qinkun@google.com>,
Mikko Ylinen <mikko.ylinen@linux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-coco@lists.linux.dev>
Subject: Re: [PATCH RFC 0/3] tsm: Unified Measurement Register ABI for TVMs
Date: Tue, 10 Sep 2024 13:07:25 -0500 [thread overview]
Message-ID: <2d459da4-03e7-4233-9c93-cd6b88886a85@intel.com> (raw)
In-Reply-To: <d49a9768-fc9c-4df7-ba11-5b25470f6feb@amazon.com>
On 9/10/2024 2:47 AM, Alexander Graf wrote:
> On 09.09.24 16:55, Xing, Cedric wrote:
>> Distinguishing them in the user interface makes enumeration of RTMRs
>> easier. Also, there are RTMR specific artifacts that static MRs don't
>> have. The most obvious is the `event_log`. `hash_algo` is less obvious
>> but it is in fact applicable to RTMRs only (the only thing that a static
>> MR has is its value). Adding those to static MRs would confuse users.
>
>
> I think that this statement is looking too much at the problem with TDX
> glasses on. Conceptually, measurements can happen at any time by any
> component and then get locked going forward. Let's look a bit at what
> different solutions do:
>
> TDX
>
> static - special registers that get written by the secure module and are
> locked at launch (?); SHA256? No event log; order defined by platform.
> dynamic - special registers that are mutable at runtime
>
> SEV-SNP
>
> static - launch digest generated by ASP at launch time using a SEV-SNP
> specific algorithm. No event log; order defined by platform.
> dynamic - not specified, would be implemented by an SVSM
>
> Nitro Enclaves
>
> static - PCR0-15 get calculated and then locked by the boot loader.
> SHA384. No event log; mechanics to reproduce are defined in docs.
> dynamic - PCR16-31 are up for customer use and can be locked at any
> later stage. SHA384. Event log is undefined and up to customer code.
>
>
> All static calculations are based on some algorithm. Yes, the algorithm
> isn't necessarily a standard digest, but they can all have a name. I can
> also absolutely see how any of the solutions above gain event log
> support for static or dynamic measurements. At the end of the day, an
> event log for static measurements is just a matter of writing it out at
> launch time.
>
> So what I'm trying to say is: In the user space ABI (file system
> layout), please treat static and dynamic registers identically. There
> really is no difference between them apart from the fact that some are
> read-only and others are read-write.
>
You are absolute right that all MRs are the same thing, and that's why
they are modeled in the same way at the CC guest driver level. In fact,
if a CC guest wants to expose all MRs in their own dirs, it could set
`TSM_MR_F_X` for all MRs and returns an error from `extend` for
static/non-extensible ones. For example, PCR0~31 may all be exposed this
way on Nitro. I hope this addresses your concerns.
next prev parent reply other threads:[~2024-09-10 18:07 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-08 4:56 [PATCH RFC 0/3] tsm: Unified Measurement Register ABI for TVMs Cedric Xing
2024-09-08 4:56 ` [PATCH RFC 1/3] tsm: Add TVM Measurement Register Support Cedric Xing
2024-09-08 4:56 ` [PATCH RFC 2/3] tsm: Add RTMR event logging Cedric Xing
2024-09-08 4:56 ` [PATCH RFC 3/3] tsm: Add TVM Measurement Sample Code Cedric Xing
2024-09-09 15:14 ` Jeff Johnson
2024-09-09 15:20 ` Xing, Cedric
2024-09-12 12:28 ` James Bottomley
2024-09-14 16:36 ` Xing, Cedric
2024-09-14 17:10 ` James Bottomley
2024-09-15 4:53 ` Xing, Cedric
2024-10-24 17:21 ` Mikko Ylinen
2024-09-08 17:37 ` [PATCH RFC 0/3] tsm: Unified Measurement Register ABI for TVMs Alexander Graf
2024-09-09 14:55 ` Xing, Cedric
2024-09-10 7:47 ` Alexander Graf
2024-09-10 18:07 ` Xing, Cedric [this message]
2024-09-10 17:09 ` Jean-Philippe Brucker
2024-09-11 4:01 ` Xing, Cedric
2024-09-11 6:56 ` Alexander Graf
2024-09-12 15:43 ` Xing, Cedric
2024-09-13 9:43 ` Alexander Graf
2024-09-11 12:06 ` James Bottomley
2024-09-11 13:46 ` Qinkun Bao
2024-09-11 14:10 ` James Bottomley
2024-09-12 3:23 ` Xing, Cedric
2024-09-12 12:15 ` James Bottomley
2024-09-12 19:00 ` Xing, Cedric
2024-09-13 12:55 ` James Bottomley
2024-09-15 4:31 ` Xing, Cedric
2024-09-13 12:58 ` James Bottomley
2024-09-15 5:14 ` Xing, Cedric
2024-09-11 23:29 ` Dan Williams
2024-09-11 23:36 ` Dan Williams
2024-09-12 9:25 ` Jean-Philippe Brucker
2024-09-12 10:03 ` Christophe de Dinechin
2024-09-12 11:02 ` Jean-Philippe Brucker
2024-09-13 19:42 ` Xing, Cedric
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-all 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=2d459da4-03e7-4233-9c93-cd6b88886a85@intel.com \
--to=cedric.xing@intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dan.j.williams@intel.com \
--cc=dionnaglaze@google.com \
--cc=graf@amazon.com \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mikko.ylinen@linux.intel.com \
--cc=qinkun@google.com \
--cc=sameo@rivosinc.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).