lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v19,RESEND 16/27] x86/sgx: Add the Linux SGX Enclave Driver
On Tue, Mar 26, 2019 at 12:01:31PM +0000, Huang, Kai wrote:
> On Wed, 2019-03-20 at 18:21 +0200, Jarkko Sakkinen wrote:
> > Intel Software Guard eXtensions (SGX) is a set of CPU instructions that
> > can be used by applications to set aside private regions of code and
> > data. The code outside the enclave is disallowed to access the memory
> > inside the enclave by the CPU access control.
> >
> > This commit adds the Linux SGX Enclave Driver that provides an ioctl API
> > to manage enclaves. The address range for an enclave, commonly referred
> > as ELRANGE in the documentation (e.g. Intel SDM), is reserved with
> > mmap() against /dev/sgx. After that a set ioctls is used to build
> > the enclave to the ELRANGE.
> >
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > Co-developed-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> > Co-developed-by: Serge Ayoun <serge.ayoun@intel.com>
> > Signed-off-by: Serge Ayoun <serge.ayoun@intel.com>
> > Co-developed-by: Shay Katz-zamir <shay.katz-zamir@intel.com>
> > Signed-off-by: Shay Katz-zamir <shay.katz-zamir@intel.com>
> > Co-developed-by: Suresh Siddha <suresh.b.siddha@intel.com>
> > Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> > ---
> > Documentation/ioctl/ioctl-number.txt | 1 +
> > arch/x86/Kconfig | 17 +-
> > arch/x86/include/uapi/asm/sgx.h | 59 ++
> > arch/x86/kernel/cpu/sgx/Makefile | 5 +-
> > arch/x86/kernel/cpu/sgx/driver/Makefile | 3 +
> > arch/x86/kernel/cpu/sgx/driver/driver.h | 38 ++
> > arch/x86/kernel/cpu/sgx/driver/ioctl.c | 795 ++++++++++++++++++++++++
> > arch/x86/kernel/cpu/sgx/driver/main.c | 290 +++++++++
> > arch/x86/kernel/cpu/sgx/encl.c | 358 +++++++++++
> > arch/x86/kernel/cpu/sgx/encl.h | 88 +++
> > arch/x86/kernel/cpu/sgx/encls.c | 1 +
> > arch/x86/kernel/cpu/sgx/main.c | 3 +
> > arch/x86/kernel/cpu/sgx/sgx.h | 1 +
> > 13 files changed, 1657 insertions(+), 2 deletions(-)
> > create mode 100644 arch/x86/include/uapi/asm/sgx.h
> > create mode 100644 arch/x86/kernel/cpu/sgx/driver/Makefile
> > create mode 100644 arch/x86/kernel/cpu/sgx/driver/driver.h
> > create mode 100644 arch/x86/kernel/cpu/sgx/driver/ioctl.c
> > create mode 100644 arch/x86/kernel/cpu/sgx/driver/main.c
> > create mode 100644 arch/x86/kernel/cpu/sgx/encl.c
> > create mode 100644 arch/x86/kernel/cpu/sgx/encl.h
>
> Shouldn't the driver be located somewhere under drivers/, but not under arch/x86?
>
> I don't think x86 maintainers should have the burden to review every code change made to SGX driver?

Not sure I got your angle. It is x86 tied code.

$ git grep tristate arch/x86/ | wc -l
22

/Jarkko

\
 
 \ /
  Last update: 2019-03-27 06:04    [W:0.149 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site