lkml.org 
[lkml]   [2023]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 04/10] swiotlb: Use free_decrypted_pages()
    On Tue, Oct 17, 2023 at 01:24:59PM -0700, Rick Edgecombe wrote:
    > 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, which could lead to functional or security issues.
    >
    > Swiotlb could free decrypted/shared pages if set_memory_decrypted() fails.
    > Use the recently added free_decrypted_pages() to avoid this.
    >
    > In swiotlb_exit(), check for set_memory_encrypted() errors manually,
    > because the pages are not nessarily going to the page allocator.

    Whatever recently introduced it didn't make it to my mailbox. Please
    always CC everyone on every patch in a series, everything else is
    impossible to review.

    \
     
     \ /
      Last update: 2023-10-18 06:50    [W:4.029 / U:0.148 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site