[RFC RFT PATCH 2/4] hv: Track decrypted status in vmbus_gpadl

2024-02-21 Thread Rick Edgecombe
On TDX it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory to the page allocator,

[RFC RFT PATCH 3/4] hv_nstvsc: Don't free decrypted memory

2024-02-21 Thread Rick Edgecombe
On TDX it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory to the page allocator,

[RFC RFT PATCH 4/4] uio_hv_generic: Don't free decrypted memory

2024-02-21 Thread Rick Edgecombe
On TDX it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory to the page allocator,

[RFC RFT PATCH 1/4] hv: Leak pages if set_memory_encrypted() fails

2024-02-21 Thread Rick Edgecombe
On TDX it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory to the page allocator,

[RFC RFT PATCH 0/4] Handle set_memory_XXcrypted() errors in hyperv

2024-02-21 Thread Rick Edgecombe
Shared (decrypted) pages should never return to the page allocator, or future usage of the pages may allow for the contents to be exposed to the host. They may also cause the guest to crash if the page is used in way disallowed by HW (i.e. for executable code or as a page table). Normally