linux-coco.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.ibm.com>
To: Jon Lange <jlange@microsoft.com>,
	David Altobelli <David.Altobelli@microsoft.com>,
	Steve Rutherford <srutherford@google.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Christophe de Dinechin" <cdupontd@redhat.com>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	"amd-sev-snp@lists.suse.com" <amd-sev-snp@lists.suse.com>
Subject: RE: SVSM vTPM specification
Date: Fri, 21 Oct 2022 23:20:16 -0400	[thread overview]
Message-ID: <7ccb703338c8a1b2287b442864e1249054bf3cc1.camel@linux.ibm.com> (raw)
In-Reply-To: <MN0PR21MB307280C94C1C54497ADDEFCECA2D9@MN0PR21MB3072.namprd21.prod.outlook.com>

On Fri, 2022-10-21 at 16:31 +0000, Jon Lange wrote:
> The drawback to having an identifier-prefixed document is that it
> necessarily restricts each report to providing only a single
> statement from a single SVSM protocol.

Actually, it doesn't.  Nothing prevents a particular type being
multiplexed (although if that happens the report for this particular
type is no-longer self describing).

>   If, in the future, we find it is common for a relying party to
> require, say, five different protocol statements, this imposes a
> requirement to obtain five separate reports.  This means a minimum of
> five round trips from the SVSM to the PSP, which seems
> undesirable.  I think we will really want to invest in defining an
> extensible format that can be placed into a single report.  I'm not
> claiming that JSON is the only option here, but I think we will
> regret any format that prevents extension within a single report.

If this becomes a future problem, we can by all means define a
multiplexed type.  However, absent knowledge that it is a real problem,
I'd like to begin with a simply defined format for the vTPM report plus
room for expansion (the type prefix).

> I'm having a hard time understanding any scenario that involves an
> entity that has access both to an SNP report and the vTPM and which
> also needs to verify the report.  If the objective is for the guest
> (which has access to the vTPM) to obtain the TPM's endorsement key,
> then it could obtain it directly via the vTPM protocol without
> requiring the SNP report.

To my way of thinking, the attestation report proves the binding of a
given vTPM to the SVSM of a given confidential enclave.  I believe this
is required before any relying party can use the TPM and rely on its
measurements. 


>   After all, the vTPM SVSM protocol does not need to be limited to
> providing exactly the functionality of the vTPM command set, but can
> also include other utilities that are useful to the guest.

I think ideally the vTPM should behave like a real TPM.  I agree we
could use extension commands to multiplex SVSM commands over the TPM
interface, but then the standardisation question becomes how?  We could
elect to document these commands in the SVSM interface and hope no-one
tramples on them or go to the TCG and hope to standardise them that
way, but the easiest thing to do is to use the SVSM document to
standardise an SVSM interface to this instead of a TPM one.  Providing
a SVSM interface doesn't preclude providing a TCG extension interface,
so if it's useful (say TDX comes on board) then we can do it later
after we've proven the value with the SVSM interface.

>   If the objective is for an external party to obtain information
> about the vTPM, then it doesn't have access to the vTPM anyway and
> will have to rely solely on what's in the report.  If the vTPM
> endorsement key is rooted to a well-known certificate, then the TPM
> certificate can be provided directly by the guest without relying on
> any SNP report (in exactly the same way that physical TPMs do not
> rely on a separate hardware root of trust to authenticate them).

A TPM certificate can only be trusted if you trust the manufacturing
process of the TPM.  This is fairly well defined for physical TPMs and
known (and regulated) manufacturers, but doesn't really work for pure
software TPMs.

>   Can you shed some light on scenarios in which you think the guest
> has no choice but to compare the SNP report and the vTPM state to
> verify that they match?

An Ephemeral vTPM: the SNP PreAttestation report confirms the code for
the SVSM and OVMF, so you need the OVMF measurements to prove the
kernel, inird and command line and the optional runtime measurements. 
If we get this right the vTPM will provide those measurement, but as a
pre-requisite to relying on those measurements, you need proof that the
vTPM you're relying on is the one within your confidential envelope. 
That's what the report provides by confirming the EK of the ephemeral
vTPM.

James



  reply	other threads:[~2022-10-22  3:20 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 16:38 SVSM vTPM specification Tom Lendacky
2022-10-12 17:33 ` Dr. David Alan Gilbert
2022-10-12 18:44   ` James Bottomley
2022-10-13 15:14     ` Tom Lendacky
2022-10-13 15:29       ` Daniele Buono
2022-10-13 15:30       ` James Bottomley
2022-10-18 20:22         ` Dov Murik
2022-10-19  5:47           ` Christophe de Dinechin
2022-10-19  6:39             ` Dov Murik
2022-10-19  8:08             ` Daniel P. Berrangé
2022-10-19 12:09               ` Christophe de Dinechin
2022-10-19 12:38               ` James Bottomley
2022-10-19 13:05                 ` Daniel P. Berrangé
2022-10-19 14:43                   ` Tom Lendacky
2022-10-19 15:20                     ` James Bottomley
2022-10-19 21:58                       ` Tom Lendacky
2022-10-19 20:57                     ` Dov Murik
2022-10-19 22:04                       ` Tom Lendacky
2022-10-19 22:14                         ` Dionna Amalie Glaze
2022-10-19 23:38                           ` James Bottomley
2022-10-19 22:36                         ` [EXTERNAL] " David Altobelli
     [not found]                           ` <CABayD+cYCj=uOtC5h1d781jh_B6XqxmZNfR69taEex7yvkizRw@mail.gmail.com>
     [not found]                             ` <SJ0PR21MB132378C080FFED1E283B4051E92A9@SJ0PR21MB1323.namprd21.prod.outlook.com>
2022-10-20 20:29                               ` James Bottomley
2022-10-21  0:02                                 ` [EXTERNAL] " Jon Lange
2022-10-21 13:04                                   ` James Bottomley
2022-10-21 16:31                                     ` [EXTERNAL] " Jon Lange
2022-10-22  3:20                                       ` James Bottomley [this message]
2022-10-24  4:51                                         ` Jon Lange
2022-10-24 10:59                                       ` Dr. David Alan Gilbert
2022-10-24 11:45                                         ` Dov Murik
2022-10-24 19:02                                           ` Tom Lendacky
2022-10-24 19:18                                             ` Dionna Amalie Glaze
2022-10-25  8:51                                             ` Dov Murik
2022-10-25  9:43                                               ` Christophe de Dinechin
2022-10-25 14:08                                                 ` Tom Lendacky
2022-10-25 14:13                                                 ` James Bottomley
2022-10-29  0:25                                                   ` Steve Rutherford
2022-10-29 13:27                                                     ` James Bottomley
2022-10-19 11:21             ` Dr. David Alan Gilbert
2022-10-19 11:45               ` James Bottomley
2022-10-12 19:05   ` James Bottomley
2022-10-13 18:54     ` Tom Lendacky
2022-10-13 19:20       ` James Bottomley
2022-10-13 20:54         ` Daniel P. Smith
2022-10-13 21:06           ` James Bottomley
2022-10-13 21:14             ` Daniel P. Smith
2022-10-13 21:41               ` James Bottomley
2022-10-14 17:16                 ` Stuart Yoder
2022-10-14 21:46                   ` Tom Lendacky
2022-10-16 16:29                     ` Daniel P. Smith
2022-10-16 16:44                       ` James Bottomley
2022-10-21 11:54                         ` Daniel P. Smith
2022-10-21 12:31                           ` James Bottomley
2022-10-18 20:45         ` Dov Murik

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=7ccb703338c8a1b2287b442864e1249054bf3cc1.camel@linux.ibm.com \
    --to=jejb@linux.ibm.com \
    --cc=David.Altobelli@microsoft.com \
    --cc=amd-sev-snp@lists.suse.com \
    --cc=berrange@redhat.com \
    --cc=cdupontd@redhat.com \
    --cc=jlange@microsoft.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=srutherford@google.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).