From: Peter Fang <peter.fang@intel.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Cc: "Hansen, Dave" <dave.hansen@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"bp@alien8.de" <bp@alien8.de>, "kas@kernel.org" <kas@kernel.org>,
"Li, Xiaoyao" <xiaoyao.li@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"sathyanarayanan.kuppuswamy@linux.intel.com"
<sathyanarayanan.kuppuswamy@linux.intel.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"tglx@kernel.org" <tglx@kernel.org>,
"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"binbin.wu@linux.intel.com" <binbin.wu@linux.intel.com>
Subject: Re: [PATCH v2 2/2] virt: tdx-guest: Allocate Quote buffer dynamically
Date: Wed, 22 Jul 2026 00:36:06 -0700 [thread overview]
Message-ID: <20260722073606.GI3178326@pedri> (raw)
In-Reply-To: <741eb8b8b83dd10d39f304133a7625f4232ab793.camel@intel.com>
On Tue, Jul 21, 2026 at 09:43:57AM -0700, Edgecombe, Rick P wrote:
> On Tue, 2026-07-21 at 06:48 -0700, Dave Hansen wrote:
> > > > The host may be untrusted, but it's also a critical part of the system.
> > > > Are we sure we want to be completely quiet?
> > > >
> > > > I used to see little dmesg warnings about TCP window shenanigans from
> > > > random systems on the Internet. Maybe that's not how we do things today,
> > > > but if a random dude on the Internet can spew one line to dmesg, is it
> > > > that crazy that a bad VMM be able to spew a warning?
> > >
> > > That makes sense... I actually argued with AI about this but it kept
> > > saying this is kind of like DoSing the guest.
>
> A guest DOSing another guest is relevant, but the host DOSing the guest is not a
> threat model we should or even can care about. If userspace or the kernel
> decides to kill the guest, that is its prerogative. At most it's a functional
> bug and not a security one.
Hmm good point. So maybe treat this more like a bug than an attack. Then
the direction is clearer.
I went back to my debate with AI and found what spooked me:
"Letting untrusted input reach a WARN is a well-known
anti-pattern precisely because of panic_on_warn — it's why
syzkaller treats any WARN as a bug."
-> but this is more of a bug than an untrusted input
"'Fail hard to defend against the attacking host' buys you zero
additional protection, while adding log-spam and a
benign-misconfig panic vector."
-> but there is also no point in limping along
>
> But... doesn't this size come from the TDX module? In which case there is no
> hope of defense from anything.
Yes it's directly from the TDX module. So maybe it's more of a question
of how loud this failure should be. There is already a:
pr_err("Failed to allocate Quote buffer\n");
... later if buffer allocation fails, so the user will see something in
dmesg. But maybe it's too subtle...
>
> > > But thinking about it
> > > more, tainting the guest is probably the right thing to do... At least
> > > the guest sees a big splat about why attestation is failing. I'll remove
> > > the __GFP_NOWARN. Thanks.
> >
> > This does seem like the kind of high-level TDX policy that we all need
> > to be aligned on and probably document somewhere. The basic question is
> > whether a TDX guest should be quiet or verbose in the face of host
> > malfunction or malfeasance.
> >
> > Kirill and Rick, what do you think?
>
> We discussed something similar around the set_memory_en/decrypted() failures.
> But that was around whether to panic or just warn. Not be silent. If the host is
> mucking around, I think security conscious guests would want to know, and even
> have the option to pass panic_on_warn. So yea I think we should assume the
> default TDX user is security conscious. "Warn on untrusted host weird behavior"
> seems like a good policy.
Sounds good to me. Thanks for providing more background.
>
> BUT, is this number coming from the untrusted host or the TDX module? I cant
> find TDCS_QUOTE_MAX_SIZE in the docs. If it is coming from the TDX module then
> we are not talking about security considerations at all. It's just a functional
> "do you want to know if things are failing". Not sure why this one would be
> special in that regard. If we think it will fail so often that we don't want a
> warning, then we probably need another solution.
Another consideration I had at the time was that this happens before
attestation. And not being able to do attestation felt like a big enough
red flag (I'm assuming something in the guest would scream). So that led
me to think that perhaps a warn would be too noisy. But I'm good with
following the TDX policy and just warn.
I think this tilts the scale towards keeping the warn. Let me know if
anyone thinks otherwise. Thanks for the discussion!
next prev parent reply other threads:[~2026-07-22 7:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 21:43 [PATCH v2 0/2] tdx-guest: Make Quote buffer size dynamic Peter Fang
2026-07-17 21:43 ` [PATCH v2 1/2] x86/tdx: Add helper to query maximum TD Quote size Peter Fang
2026-07-22 13:21 ` Binbin Wu
2026-07-17 21:43 ` [PATCH v2 2/2] virt: tdx-guest: Allocate Quote buffer dynamically Peter Fang
2026-07-17 21:55 ` sashiko-bot
2026-07-27 10:13 ` Peter Fang
2026-07-20 13:35 ` Dave Hansen
2026-07-21 6:49 ` Peter Fang
2026-07-21 13:48 ` Dave Hansen
2026-07-21 16:43 ` Edgecombe, Rick P
2026-07-22 7:36 ` Peter Fang [this message]
2026-07-22 12:00 ` Kiryl Shutsemau
2026-07-23 8:19 ` Peter Fang
2026-07-22 6:39 ` Peter Fang
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=20260722073606.GI3178326@pedri \
--to=peter.fang@intel.com \
--cc=binbin.wu@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rick.p.edgecombe@intel.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=xiaoyao.li@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