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