lkml.org 
[lkml]   [2018]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v17 18/23] platform/x86: Intel SGX driver
From
Date
On 12/17/18 11:37 AM, Jarkko Sakkinen wrote:
>> Suggestion:
>>
>> It looks like you only expect one VMA per enclave. Things go bonkers if
>> this is not true. So, instead of storing encl->mm, don't. You can get
>> the mm from vma->vm_mm and you could just store encl->vma instead.
> The code actually supports having multiple VMAs per enclave.

That seems at least somewhat at odds with this comment:

> static void sgx_vma_open(struct vm_area_struct *vma)
> {
> struct sgx_encl *encl = vma->vm_private_data;
>
> if (!encl)
> return;
>
> /* kref cannot underflow because ECREATE ioctl checks that there is only
> * one single VMA for the enclave before proceeding.
> */
> kref_get(&encl->refcount);
> }

\
 
 \ /
  Last update: 2018-12-17 20:41    [W:0.117 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site