Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Sathyanarayanan Kuppuswamy  <sathyanarayanan.kuppuswamy@linux.intel.com>
To: "Huang, Kai" <kai.huang@intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"x86@kernel.org" <x86@kernel.org>, "bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"wander@redhat.com" <wander@redhat.com>,
	"tim.gardner@canonical.com" <tim.gardner@canonical.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"isaku.yamahata@gmail.com" <isaku.yamahata@gmail.com>,
	"kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"Luck, Tony" <tony.luck@intel.com>,
	"khalid.elmously@canonical.com" <khalid.elmously@canonical.com>,
	"marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>,
	"Cox, Philip" <philip.cox@canonical.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v13 2/3] selftests: tdx: Test TDX attestation GetReport support
Date: Mon, 12 Sep 2022 15:06:01 -0700	[thread overview]
Message-ID: <7600f26c-d107-a0ec-f601-9bd8c203fc81@linux.intel.com> (raw)
In-Reply-To: <73c43175226bb0f9a9dcae8ba953b213db47fbc8.camel@intel.com>

Hi Kai,

On 9/12/22 12:17 AM, Huang, Kai wrote:
> On Fri, 2022-09-09 at 12:27 -0700, Kuppuswamy Sathyanarayanan wrote:
>> Attestation is used to verify the trustworthiness of a TDX guest.
>> During the guest bring-up, Intel TDX module measures and records
>> the initial contents and configuration of the guest, and at runtime,
>> guest software uses runtime measurement registers (RMTRs) to measure
>> and record details related to kernel image, command line params, ACPI
>> tables, initrd, etc. At TDX guest runtime, Intel SGX attestation
>> infrastructure is re-used to attest to these measurement data.
> 
> Similar the comment to patch 3, I don't particularly like "to attest" part as
> only the verification service can truly _attest_ somthing (I suppose the "SGX
> infrastructure" here you mean SGX QE to generate the Quote). 
> 
> I think you can just say something like "TDX leverages SGX Quote mechanism to
> support remote attestation of TDX guests".  And you can combine this with below
> paragraph.

The part about leveraging the SGX infrastructure is not very important. We can
even drop it. But I want to add some details about what we do with this measurement
data. In the first paragraph, we have started with collection of measurements data.
If we directly jump to attestation process without explaining the need for collecting
measurements, it will be a bit confusing.

How about following version?

Attestation is used to verify the trustworthiness of a TDX guest.

During the guest bring-up, Intel TDX module measures and records

the initial contents and configuration of the guest, and at runtime,

guest software uses runtime measurement registers (RMTRs) to measure

and record details related to kernel image, command line params, ACPI

tables, initrd, etc. At guest runtime, the attestation process is used
to
 attest to these measurements.

  

> 
>>
>> First step in the TDX attestation process is to get the TDREPORT data.
>> It is a fixed size data structure generated by the TDX module which
>> includes the above mentioned measurements data, a MAC to protect the
>> integerity of the TDREPORT, and a 64-Byte of user specified data passed
>> during TDREPORT request which can uniquely identify the TDREPORT.
>>
>> Intel's TDX guest driver exposes TDX_CMD_GET_REPORT IOCTL interface to
>> get the TDREPORT from the user space.
>>
>> Add a kernel selftest module to test this ABI and verify the validity
>> of generated TDREPORT.
>>
>> Reviewed-by: Tony Luck <tony.luck@intel.com>
>> Reviewed-by: Andi Kleen <ak@linux.intel.com>
>> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> 
> Anyway (although still not sure all the definitions of TDX architectural data
> structures are needed):
> 
> Acked-by: Kai Huang <kai.huang@intel.com>
> 
> 
> 

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer

  reply	other threads:[~2022-09-12 22:06 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 19:27 [PATCH v13 0/3] Add TDX Guest Attestation support Kuppuswamy Sathyanarayanan
2022-09-09 19:27 ` [PATCH v13 1/3] x86/tdx: Add TDX Guest attestation interface driver Kuppuswamy Sathyanarayanan
2022-09-09 19:39   ` Greg Kroah-Hartman
2022-09-09 19:41   ` Dave Hansen
2022-09-09 20:07     ` Sathyanarayanan Kuppuswamy
2022-09-09 20:54       ` Dave Hansen
2022-09-12 22:22   ` Kirill A . Shutemov
2022-09-12 23:00     ` Sathyanarayanan Kuppuswamy
2022-09-13  1:25   ` Huang, Kai
2022-09-13  2:44     ` Sathyanarayanan Kuppuswamy
2022-09-13  5:03       ` Huang, Kai
2022-09-13  9:01       ` Dave Hansen
2022-09-13 15:21         ` Sathyanarayanan Kuppuswamy
2022-09-14 11:36   ` Dave Hansen
2022-09-14 15:36     ` Sathyanarayanan Kuppuswamy
2022-09-14 16:12       ` Dave Hansen
2022-09-14 16:25         ` Sathyanarayanan Kuppuswamy
2022-09-15  0:30         ` Sathyanarayanan Kuppuswamy
2022-09-15 11:07           ` Greg Kroah-Hartman
2022-09-15 11:09   ` Greg Kroah-Hartman
2022-09-15 15:22     ` Sathyanarayanan Kuppuswamy
2022-09-16  8:12       ` Greg Kroah-Hartman
2022-09-09 19:27 ` [PATCH v13 2/3] selftests: tdx: Test TDX attestation GetReport support Kuppuswamy Sathyanarayanan
2022-09-12  7:17   ` Huang, Kai
2022-09-12 22:06     ` Sathyanarayanan Kuppuswamy [this message]
2022-09-12 22:54       ` Huang, Kai
2022-09-12  7:21   ` Huang, Kai
2022-09-12 21:38     ` Sathyanarayanan Kuppuswamy
2022-09-12 22:56       ` Huang, Kai
2022-09-09 19:27 ` [PATCH v13 3/3] Documentation/x86: Document TDX attestation process Kuppuswamy Sathyanarayanan
2022-09-12  7:04   ` Huang, Kai
2022-09-12 14:15     ` Sathyanarayanan Kuppuswamy
2022-09-12 21:01       ` Huang, Kai
2022-09-13 17:54   ` Kirill A . Shutemov
2022-09-13 18:25     ` Sathyanarayanan Kuppuswamy
2022-09-14  1:23     ` Sathyanarayanan Kuppuswamy
2022-09-14 13:41       ` Kirill A. Shutemov
2022-09-14 21:09       ` Huang, Kai

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=7600f26c-d107-a0ec-f601-9bd8c203fc81@linux.intel.com \
    --to=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=isaku.yamahata@gmail.com \
    --cc=kai.huang@intel.com \
    --cc=khalid.elmously@canonical.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=marcelo.cerri@canonical.com \
    --cc=mingo@redhat.com \
    --cc=philip.cox@canonical.com \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tim.gardner@canonical.com \
    --cc=tony.luck@intel.com \
    --cc=wander@redhat.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