All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Middleton <dan.middleton@linux.intel.com>
To: Mikko Ylinen <mikko.ylinen@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>
Cc: Kuppuswamy Sathyanarayanan
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Nikolay Borisov <nik.borisov@suse.com>,
	linux-coco@lists.linux.dev, x86@kernel.org,
	dave.hansen@linux.intel.com, dionnaglaze@google.com
Subject: Re: [PATCH] virt: tdx-guest: Deprecate legacy IOCTL-based interface for quote generation
Date: Thu, 8 Feb 2024 18:23:25 -0800	[thread overview]
Message-ID: <bb5543c8-b14e-42cb-a13b-9467fa87622f@linux.intel.com> (raw)
In-Reply-To: <ZcTaW3gKIWWF1fKS@himmelriiki>


On 2/8/24 7:42 AM, Mikko Ylinen wrote:
> On Wed, Jan 31, 2024 at 01:09:03PM -0800, Dan Williams wrote:
>> Kuppuswamy Sathyanarayanan wrote:
>>> On 1/31/24 11:50 AM, Dan Williams wrote:
>>>> Kuppuswamy Sathyanarayanan wrote:
>>>>> + Dan Middleton
>>>>>
>>>>> Hi Boris,
>>>>>
>>>>> On 1/24/24 1:38 AM, Nikolay Borisov wrote:
>>>>>> IOCTL based interface was the natural choice for interacting with the
>>>>>> quote generation machine at a time when there wasn't anything better.
>>>>>> Fortunately, now we have a vendor-agnostic, configfs-based one which
>>>>>> obviates the need to have the IOCTL-based interface.
>>>>>>
>>>>>> Gate the relevant code behind a Kconfig option, clearly marking it as
>>>>>> deprecated as well as introduce a runtime warning.
>>>>>>
>>>>>> Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
>>>>>> ---
>>>>> In the following thread, Dan Middleton raised a point about this interface
>>>>> being used for local attestation use cases.
>>>>>
>>>>> https://lore.kernel.org/all/ZbAaKAh-230Hj4BF@redhat.com/T/#m691dae9a7833a35552cafb597c838df9c2ed5f3a
>>>>>
>>>>> Currently, the configfs-based ABI does not support the local attestation use cases.
>>>> What are local attestation use cases, and what happens if Linux does not
>>>> provide a local attestation interface and standardizes on remotely
>>>> attestable as the standard?
>>>
>>> Local attestation is used by one TD on the same platform to prove to another TD
>>> in the same platform about its identity. It is mainly used in cases where a TD provides
>>> some special services required by other TDs. Since they are all in the same platform,
>>> there is no need for a 3rd party verifier or Quoting service. It can use the verifiable MAC
>>> to check the correctness of the TD.
>>>
>>> I am not sure about actual local attestation users. May be Dan can share that info.
>>>
>>> Regarding your question about using "remotely attestable as the standard", I think
>>> remote attestation can handle all local attestation use cases. But, does it make sense to
>>> force users to run a Quoting service if they don't need to communicate with 3rd party
>>> servers?
>> SEV-SNP seems to get by without a local attestation flow, if I am not
>> mistaken, so the question is why should the kernel support cross-vendor
>> divergence here? Remember, the kernel ends up being the "standardization
>> body of last resort", it does not need to onboard all the complexity it
>> can find.
>>
>>> SGX also seems to have local attestation concept
>>>
>>> https://sgx101.gitbook.io/sgx101/sgx-bootstrap/attestation/inter-process-local-attestation
>> I am less concerned with concepts, and more concerned with use cases.
>> For example it could be the case that configfs-tsm needs to grow to
>> support local attestation for multiple vendors, but that should be due
>> to concrete use cases to be deployed, not theoretical observations.
> Confidential Containers project started using the tdx_guest ioctl() to get
> the TD report. This is used by the attestation-agent to check that the hash
> of a policy file is correctly included in the TD report's MRCONFIGID field.
>
> The report stays within the TD and there's no need take it to the host QGS
> quoting service for signing. Right now we need to go to configs-tsm for
> the quote and tdx_guest ioctl() for the TD report.
>
> The corresponding SNP check in this use case is to get the HOSTDATA report
> field by using 'get report' ioctl() (non-ext version is enough). With
> configfs-tsm this is same as using just 'outblob' and ignoring 'auxblob',
> AFAICS.
>
> However, perhaps some generic report 'type' TSM report attribute would be
> justified here to allow users select between TD report/quote and
> report/ext_report generation?
>
> -- Regards, Mikko
Sorry, I somehow missed the continuation of this thread.

I think there's a couple use cases mentioned here including
1. Service TDs like vTPM (there is code for this[1]. I can't speak to 
its adoption.)

2. Locally verifiable evidence as visible in CNCF CoCo (thanks Mikko).

I don't think it should be deprecated until / unless there is a
committed alternative like a configfs-tsm feature.
I don't know the kernel community's preference for a single vendor
configfs-tsm feature vs a single vendor ioctl.

I would suspect that other vendors will offer local attestations based
on local appearing in SGX and TDX, but that's speculation. If so their
APIs would better inform a new common configfs-tsm feature.
Maybe people with knowledge of AMD, Arm, and RISC-V disclosed plans can

comment.


[1] https://github.com/intel/vtpm-td/tree/main


Thanks,
Dan Middleton



  reply	other threads:[~2024-02-09  2:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24  9:38 [PATCH] virt: tdx-guest: Deprecate legacy IOCTL-based interface for quote generation Nikolay Borisov
2024-01-31  7:28 ` Nikolay Borisov
2024-01-31 15:27   ` Dave Hansen
2024-01-31 18:18     ` Nikolay Borisov
2024-01-31 19:05       ` Dave Hansen
2024-02-01  4:14         ` Haitao Huang
2024-02-01  4:55           ` Dan Williams
2024-01-31  7:48 ` Kuppuswamy Sathyanarayanan
2024-01-31 19:50   ` Dan Williams
2024-01-31 19:56     ` Nikolay Borisov
2024-01-31 20:44     ` Kuppuswamy Sathyanarayanan
2024-01-31 21:00       ` Daniel P. Berrangé
2024-01-31 21:12         ` Dan Williams
2024-02-01  2:52           ` Kuppuswamy Sathyanarayanan
2024-02-01  8:15           ` Daniel P. Berrangé
2024-01-31 21:09       ` Dan Williams
2024-02-08 13:42         ` Mikko Ylinen
2024-02-09  2:23           ` Dan Middleton [this message]
2024-02-12 23:12             ` Dan Williams
2024-01-31 20:23 ` Dan Williams

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=bb5543c8-b14e-42cb-a13b-9467fa87622f@linux.intel.com \
    --to=dan.middleton@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dionnaglaze@google.com \
    --cc=linux-coco@lists.linux.dev \
    --cc=mikko.ylinen@linux.intel.com \
    --cc=nik.borisov@suse.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.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 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.