[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d96a23f-a16a-50e1-7960-a2d4998ce52f@intel.com>
Date: Tue, 23 May 2023 15:43:15 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: kirill.shutemov@...ux.intel.com
Cc: Dexuan Cui <decui@...rosoft.com>, ak@...ux.intel.com,
arnd@...db.de, bp@...en8.de, brijesh.singh@....com,
dan.j.williams@...el.com, dave.hansen@...ux.intel.com,
haiyangz@...rosoft.com, hpa@...or.com, jane.chu@...cle.com,
kys@...rosoft.com, linux-arch@...r.kernel.org,
linux-hyperv@...r.kernel.org, luto@...nel.org, mingo@...hat.com,
peterz@...radead.org, rostedt@...dmis.org,
sathyanarayanan.kuppuswamy@...ux.intel.com, seanjc@...gle.com,
tglx@...utronix.de, tony.luck@...el.com, wei.liu@...nel.org,
x86@...nel.org, mikelley@...rosoft.com,
linux-kernel@...r.kernel.org, Tianyu.Lan@...rosoft.com
Subject: Re: [PATCH v6 2/6] x86/tdx: Support vmalloc() for
tdx_enc_status_changed()
On 5/23/23 15:37, kirill.shutemov@...ux.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?
Powered by blists - more mailing lists