[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181108144603.GA14072@linux.intel.com>
Date: Thu, 8 Nov 2018 16:46:03 +0200
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>
Cc: x86@...nel.org, platform-driver-x86@...r.kernel.org,
linux-sgx@...r.kernel.org, dave.hansen@...el.com,
nhorman@...hat.com, npmccallum@...hat.com, serge.ayoun@...el.com,
shay.katz-zamir@...el.com, haitao.huang@...el.com,
andriy.shevchenko@...ux.intel.com, tglx@...utronix.de,
kai.svahn@...el.com, Suresh Siddha <suresh.b.siddha@...el.com>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Darren Hart <dvhart@...radead.org>,
Andy Shevchenko <andy@...radead.org>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>
Subject: Re: [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
Powered by blists - more mailing lists