lkml.org 
[lkml]   [2018]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v16 18/22] platform/x86: Intel SGX driver
On Wed, Nov 07, 2018 at 10:00:57AM -0800, Sean Christopherson wrote:
> What do we gain by a single buffer vs. separate buffers? The ioctl()
> would be slightly smaller but it seems like the actual code would be
> more complex.

I'm fine with either. It was just a suggestion.

> The enclave build process also utilizes the backing as temp storage
> to avoid having to alloc kernel memory when queueing pages to be added
> by the worker thread (which reminds me that I wanted to document why a
> worker thread is used). Keeping this behavior would effectively make
> providing backing mandatory.

Would it be a problem just allocate those pages with alloc_page() and
free them in the worker thread?

> Are there any potential complications with ENCLS consuming userspace
> pointers? We'd have to wrap them with user_access_{begin,end}() and
> probably tweak the fixup, but I assume having the fixup handler means
> we're generally ok?

Last time I did it I used get_user_pages() for pinning. I'm not sure
why I should do anything but just re-use that.

/Jarkko

\
 
 \ /
  Last update: 2018-11-08 15:47    [W:0.112 / U:21.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site