x86/sgx: Add an SGX misc driver interface
authorJarkko Sakkinen <jarkko@kernel.org>
Thu, 12 Nov 2020 22:01:22 +0000 (00:01 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 18 Nov 2020 17:01:16 +0000 (18:01 +0100)
commit3fe0778edac8628637e2fd23835996523b1a3372
treef311d16306a3b385336cefd22643678084b3ee52
parent95bb7c42ac8a94ce3d0eb059ad64430390351ccb
x86/sgx: Add an SGX misc driver interface

Intel(R) SGX is a new hardware functionality that can be used by
applications to set aside private regions of code and data called
enclaves. New hardware protects enclave code and data from outside
access and modification.

Add a driver that presents a device file and ioctl API to build and
manage enclaves.

 [ bp: Small touchups, remove unused encl variable in sgx_encl_find() as
Reported-by: kernel test robot <lkp@intel.com> ]
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Co-developed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Jethro Beekman <jethro@fortanix.com>
Link: https://lkml.kernel.org/r/20201112220135.165028-12-jarkko@kernel.org
arch/x86/kernel/cpu/sgx/Makefile
arch/x86/kernel/cpu/sgx/driver.c [new file with mode: 0644]
arch/x86/kernel/cpu/sgx/driver.h [new file with mode: 0644]
arch/x86/kernel/cpu/sgx/encl.c [new file with mode: 0644]
arch/x86/kernel/cpu/sgx/encl.h [new file with mode: 0644]
arch/x86/kernel/cpu/sgx/main.c