lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 2/6] x86/tdx: Support vmalloc() for tdx_enc_status_changed()
From
On 5/23/23 15:37, kirill.shutemov@linux.intel.com wrote:
>> How does this work with load_unaligned_zeropad()? Couldn't it be
>> running around poking at one of these vmalloc()'d pages via the direct
>> map during a shared->private conversion before the page has been accepted?
> Alias processing in __change_page_attr_set_clr() will change direct
> mapping if you call it on vmalloc()ed memory. I think we are safe wrt
> load_unaligned_zeropad() here.

We're *eventually* OK:

> /* Notify hypervisor that we are about to set/clr encryption attribute. */
> x86_platform.guest.enc_status_change_prepare(addr, numpages, enc);
>
> ret = __change_page_attr_set_clr(&cpa, 1);

But what about in the middle between enc_status_change_prepare() and
__change_page_attr_set_clr()? Don't the direct map and the
shared/private status of the page diverge in there?

\
 
 \ /
  Last update: 2023-05-24 00:44    [W:1.034 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site