mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "moe@flashbots.net" <moe@flashbots.net>
Cc: "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"kas@kernel.org" <kas@kernel.org>,
	"Miao, Jun" <jun.miao@intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"sathyanarayanan.kuppuswamy@linux.intel.com"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
	"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
	"djbw@kernel.org" <djbw@kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [🚨ext] Re: [PATCH v3 0/2] virt: tdx-guest: Fix and speed up the wait for a Quote
Date: Tue, 24 Nov 2026 18:11:29 +0000	[thread overview]
Message-ID: <b9a69a9ca8665f7edc1e80b2516423154248d1c5.camel@intel.com> (raw)
In-Reply-To: <CAKV3HMMjyHig6LTiCsXKLvgvsW+0GVitCc0ziBD9RNxH2TAuvA@mail.gmail.com>

On Wed, 2026-11-18 at 14:55 +0000, Moe Mahhouk wrote:
> On Wed, 2026-11-18 at 01:28 +0000, Edgecombe, Rick P wrote:
> > I'd think a simpler shortening of the time would be better than something more
> > advanced. But...
> 
> OK. In v4, patch 2 will replace the backoff with a fixed 10 ms sleep.
> Patch 1 stays as it is. It fixes the timeout check and is marked for
> stable, so it could also go in on its own.

Ok.

> 
> > Shouldn't attested TLS just be used to set up some other key such that
> > subsequent connections can be as fast as normal TLS? 0.1s is still kind of slow.
> 
> The 0.1 s was the total for ten clients connecting at once. Each Quote
> took about 8 ms with v3 of patch 2 (median of 120 back-to-back Quotes at
> HZ=250), and quote_lock runs them one after the other.
> 
> Our HTTP proxy already does part of this. A client keeps its attested
> connection open and sends all its requests over it, so it needs one
> Quote per connection, not per request. What is left is the first
> connection of each client. Many clients can arrive at once, for example
> after the TD restarts. Today the last of N clients waits about N
> seconds.
> 
> We don't trust a key from an earlier attestation for new connections.
> If a later connection relied only on such a key, a leaked key would be
> enough to pass as the TD without any Quote. The recent relay attacks on
> attested TLS used this kind of gap. In CVE-2026-108269 (CVSS 9.1) the
> Quote was bound to the TLS key and a client nonce but not to the
> session, so an attacker with the TLS private key could relay a genuine
> Quote onto its own connection. Binding each Quote to keying material
> exported from that session closes this. The exported value is unique to
> each handshake, so it also serves as the nonce.

Thanks for sharing. The case is "an attacker with the TLS private key" and a bug
in a client library? It sounds like a pretty aggressive threat model. I'm still
not sure quoting is setup for this kind of thing from a performance perspective.
But very interesting to hear about the use case.

> 
> > In the end I think quote based attested TLS is not normally expected to be fast.
> > So is this trying to optimize the wrong thing?
> 
> It does not need to be as fast as plain TLS. But the second is not the
> cost of attestation. With a local QGS the Quote is ready a few
> milliseconds after the request, but the driver does not check again for
> a full second. Any user of configfs-tsm on TDX pays that, whatever runs
> on top. The patch shortens that wait. It does not try to make the Quote
> itself faster.
> 
> If that works for you, I will send v4 with the fixed interval.

Yea, let's just go with the polling fix and the faster rate. It seems the
default is too high based on the assumption that users would rather spend CPU
cycles then wait when getting a quote.

And sorry for the slow responses. I was waiting for someone else to chime in but
it seems they will not be able to.


      reply	other threads:[~2026-11-24 18:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24 19:17 Moe Mahhouk via B4 Relay
2026-10-24 19:17 ` [PATCH v3 1/2] virt: tdx-guest: Fix timeout detection in wait_for_quote_completion() Moe Mahhouk via B4 Relay
2026-10-27 13:50   ` Xiaoyao Li
2026-10-24 19:17 ` [PATCH v3 2/2] virt: tdx-guest: Poll Quote status with exponential backoff Moe Mahhouk via B4 Relay
2026-10-27 14:08   ` Xiaoyao Li
2026-11-03 10:03     ` [🚨ext] " Moe Mahhouk
2026-11-02 19:55 ` [PATCH v3 0/2] virt: tdx-guest: Fix and speed up the wait for a Quote Edgecombe, Rick P
2026-11-03  9:56   ` [🚨ext] " Moe Mahhouk
2026-11-13  9:09     ` Moe Mahhouk
2026-11-13 17:33     ` Edgecombe, Rick P
2026-11-14 11:41       ` Moe Mahhouk
2026-11-18  1:28         ` Edgecombe, Rick P
2026-11-18 14:55           ` Moe Mahhouk
2026-11-24 18:11             ` Edgecombe, Rick P [this message]

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=b9a69a9ca8665f7edc1e80b2516423154248d1c5.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=djbw@kernel.org \
    --cc=erdemaktas@google.com \
    --cc=jun.miao@intel.com \
    --cc=kas@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moe@flashbots.net \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®