All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe de Dinechin Dupont de Dinechin <cdupontd@redhat.com>
To: Jon Lange <jlange@microsoft.com>
Cc: "Jörg Rödel" <jroedel@suse.de>,
	"Tom Lendacky" <thomas.lendacky@amd.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: [EXTERNAL] SVSM Attestation and vTPM specification additions - v0.60
Date: Wed, 1 Feb 2023 16:20:27 +0100	[thread overview]
Message-ID: <02020D95-2BF1-4999-80BD-86CD8589197C@redhat.com> (raw)
In-Reply-To: <MN0PR21MB3072B127F1B0D6E0F73DF37ACAD09@MN0PR21MB3072.namprd21.prod.outlook.com>



> On 31 Jan 2023, at 05:44, Jon Lange <jlange@microsoft.com> wrote:
> 
> Joerg, I'm encouraged to see that we agree about most of the points related to implementation-specific protocol extensions.  It seems like the places where we have yet to come together have less to do with how the standard is defined but about how to approach implementation choices.  That's not really something that can be legislated into a standard (as you suggest) so we'll just have to trust that the right thing happens.
> 
> As far as how to enumerate implementation-specific extensions, why not just embrace the core concept of the protocol's extensibility, which is that individual protocol numbers are optional?  SVSM implementation 1A could propose protocol number 0x123 is its own extensions, and SVSM implementation X could propose protocol number 0xABC as its extensions, etc.  This would eliminate any need to define any first-class concept of implementation identity (thus eliminating the need for an identity registry) and would also eliminate the question of deciding which commands within a given protocol are implemented by a given SVSM.  Instead, a guest OS could query for the implementation protocol it wants, and if it's present, it can use it, and if it is absent, it won't.  A given implementation could choose to lump all of its various implementation-specific extensions into a single protocol, or add a different protocol number for every set of extensions (one for logging, a separate one for other configuration - whatever).  With a 32-bit protocol ID space to choose from, I suspect we don't have to worry too much about running out of IDs quickly, as long as we can construct some logical defense for every separate protocol ID.  And, as a bonus, those individual "implementation-specific" constructs that are easily embraced by another implementation can easily transform into standards without requiring an all-or-nothing adoption of an implementation's complete extension set - from your earlier comments about prototyping, this seems like one of the extensibility features you were hoping to achieve.

This is a common problem in the industry. For example, OpenGL had various extensions that could be queried, each exposing an interface (similar to the protocols here). C and C++ compilers exposed “working group” features or compiler-specific extensions in various ways.

In all cases, some extensions are meant to be and remain “implementation-dependent” whereas others may be work in progress with the intent to become part of the standard later. In OpenGL, GL_NV_draw_vulkan_image would be an example of the former, being specific to NVIDIA, whereas GL_ARB_arrays_of_arrays an example of the latter, ARB standing for Architecture Review Board). Another important aspect is to be able to query the available protocols in a portable way.

With IDs, I would split the ID space into three segments:
- The standard part, which we have today
- The experimental part, to become standard with possibly some changes
- The implementation-dependent part, never to be used by portable code

I must admit that I also thought of logging as an obvious extension to the current protocols, and I was also torn about how to standardize that. The risk of not having an “experimental” part to the ID space is that there will be a lot of discussion and bike shedding before we all agree on something. By contrast, pushing an experiment and having people test it should be comparatively painless.

I’m also considering future changes in the underlying hardware, exposing capabilities that may not exist today. One example that was discussed in another thread is the possibility, some day, to attest not just the guest code, but the host hypervisor and kernel as well. In the AMD case, I suspect this would involve having some of their code running at VMPL0, and maybe having a “VMPL1 SVSM” interface.


Cheers,
Christophe


  parent reply	other threads:[~2023-02-01 15:20 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 18:54 SVSM Attestation and vTPM specification additions - v0.60 Tom Lendacky
2023-01-10 19:37 ` Tom Lendacky
2023-01-10 19:40 ` Dionna Amalie Glaze
2023-01-10 21:03   ` Tom Lendacky
2023-01-10 22:14     ` James Bottomley
2023-01-10 22:45       ` Tom Lendacky
2023-01-10 23:52         ` James Bottomley
2023-01-11  9:15           ` Christophe de Dinechin Dupont de Dinechin
2023-01-10 20:29 ` James Bottomley
2023-01-10 20:37   ` James Bottomley
2023-01-10 21:33     ` Tom Lendacky
2023-01-10 21:32   ` Tom Lendacky
2023-01-10 21:47     ` James Bottomley
2023-01-10 23:00       ` Tom Lendacky
2023-01-10 23:09         ` James Bottomley
2023-01-11 14:49           ` Tom Lendacky
2023-01-11 14:56             ` James Bottomley
2023-01-10 23:14         ` James Bottomley
2023-01-11 16:39 ` Christophe de Dinechin
2023-01-11 23:00   ` Tom Lendacky
2023-01-12  1:27     ` [EXTERNAL] " Jon Lange
2023-01-13 16:10       ` Tom Lendacky
2023-01-12 13:57   ` James Bottomley
2023-01-12 15:13     ` Tom Lendacky
2023-01-12 15:24       ` James Bottomley
2023-01-13 16:12         ` Tom Lendacky
2023-01-12  8:19 ` Dov Murik
2023-01-12 12:18   ` James Bottomley
2023-01-13 16:16   ` Tom Lendacky
2023-01-13 11:50 ` Nicolai Stange
2023-01-13 17:20   ` Tom Lendacky
2023-01-24  9:35 ` Jörg Rödel
2023-01-26 14:36   ` Tom Lendacky
2023-01-26 16:45     ` Christophe de Dinechin Dupont de Dinechin
2023-02-01 10:50   ` Jörg Rödel
2023-02-20 15:10     ` Tom Lendacky
2023-01-24  9:45 ` Jörg Rödel
2023-01-26 14:51   ` Tom Lendacky
2023-01-26 16:49     ` Christophe de Dinechin Dupont de Dinechin
2023-01-26 17:33       ` [EXTERNAL] " Jon Lange
2023-01-27  8:35         ` Jörg Rödel
2023-01-27 16:11           ` Jon Lange
2023-01-30 11:29             ` Jörg Rödel
2023-01-31  4:44               ` Jon Lange
2023-01-31 15:06                 ` Tom Lendacky
2023-01-31 15:34                   ` Jon Lange
2023-02-01 15:20                 ` Christophe de Dinechin Dupont de Dinechin [this message]
2023-02-02  6:04                   ` [EXTERNAL] " Jon Lange

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=02020D95-2BF1-4999-80BD-86CD8589197C@redhat.com \
    --to=cdupontd@redhat.com \
    --cc=amd-sev-snp@lists.suse.com \
    --cc=jlange@microsoft.com \
    --cc=jroedel@suse.de \
    --cc=linux-coco@lists.linux.dev \
    --cc=thomas.lendacky@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.