lkml.org 
[lkml]   [2022]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 03/20] x86/sgx: Track owning enclave in VA EPC pages
From
On 9/22/22 13:04, Kristen Carlson Accardi wrote:
>> BTW, is there a flag or any other way to tell to what kind of object
>> ->owner points?
> The owner will only be an sgx_encl type if it is a va page, so to tell
> what kind of object owner is, you look at the epc page flags - like
> this:
> if (epc_page->flags & SGX_EPC_PAGE_ENCLAVE)
> encl = ((struct sgx_encl_page *)epc_page->owner)->encl;
> else if (epc_page->flags & SGX_EPC_PAGE_VERSION_ARRAY)
> encl = epc_page->owner;
> ...

I don't know how much refactoring it would take, but it would be nice if
that was a bit more obvious. Basically, can we get the code that checks
for or sets SGX_EPC_PAGE_VERSION_ARRAY close to the code that assigns or
reads ->owner?

\
 
 \ /
  Last update: 2022-09-22 23:40    [W:0.058 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site