google / google/gvisor

support for Intel TDX

Open
#6,378 4 comments 0 reactions 0 assignees View on GitHub
area: platform type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

### Description

Last year, Intel published a whitepaper on their new TDX "Trust Domain Extensions" technology for better securing virtual machines. TDX is built using a combination of VMX & MKTME technology, and a CPU-attested, software module, as shown in the figure below. Intel TDX solution can provide the following capabilities to TDs:
* Memory and CPU state confidentiality and integrity to help keep the sensitive IP and workload data secure from most software-based attacks and many hardware-based attacks.
* Remote attestation enables a relying party (either the owner of the workload or a user of the services provided by the workload) to establish trustworthiness prior to providing that workload data.

Details can be referred to such links:
Whitepaper: https://software.intel.com/content/dam/develop/external/us/en/documents/tdx-whitepaper-v4.pdf
Specification: https://software.intel.com/content/www/cn/zh/develop/articles/intel-trust-domain-extensions.html
![intel_tdx](https://user-images.githubusercontent.com/88015902/127111639-09efef56-7df7-461c-a045-98e454d900a5.jpg)

In addition, Intel also released some patchsets to enable MKTME and TDX.
* Intel MKTME enabling: https://lwn.net/Articles/787852, added support for MKTME into the existing kernel keyring subsystem and add a new mprotect_encrypt() system call that can be used by applications to encrypt anonymous memory with keys obtained from the keyring.
* KVM-X86 TDX support: https://lwn.net/Articles/861776, enabled the TDX module during boot, and added new KVM API, TDX-specific ioctl (sub)command for building and running TDs, allowing both legacy(normal VMX) VMs and new TD VMs to coexist.

The virtualization, memory encryption, etc. provided by TDX would actually decrease the attack surface, and benefit gVisor a lot. Since gVisor supports the KVM platform, it seems possible to support the TDX feature with some modifications. From my perspective, to load the Sentry or other parts into the TD, and to handle the encrypted memory (especially, the shared memory) could be challenging. I wonder if you would take TDX feature into consideration, and what your architectural thoughts on it.

### Is this feature related to a specific bug?

_No response_

### Do you have a specific solution in mind?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.