]> git.ipfire.org Git - people/ms/linux.git/commit
x86/sgx: Add SGX_IOC_ENCLAVE_CREATE
authorJarkko Sakkinen <jarkko@kernel.org>
Thu, 12 Nov 2020 22:01:23 +0000 (00:01 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 18 Nov 2020 17:02:49 +0000 (18:02 +0100)
commit888d249117876239593fe3039b6ead8ad6849035
tree6d5ab35b2e1141c5360838279b58ca82ebb5411f
parent3fe0778edac8628637e2fd23835996523b1a3372
x86/sgx: Add SGX_IOC_ENCLAVE_CREATE

Add an ioctl() that performs the ECREATE function of the ENCLS
instruction, which creates an SGX Enclave Control Structure (SECS).

Although the SECS is an in-memory data structure, it is present in
enclave memory and is not directly accessible by software.

Co-developed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Jethro Beekman <jethro@fortanix.com>
Link: https://lkml.kernel.org/r/20201112220135.165028-13-jarkko@kernel.org
Documentation/userspace-api/ioctl/ioctl-number.rst
arch/x86/include/uapi/asm/sgx.h [new file with mode: 0644]
arch/x86/kernel/cpu/sgx/Makefile
arch/x86/kernel/cpu/sgx/driver.c
arch/x86/kernel/cpu/sgx/driver.h
arch/x86/kernel/cpu/sgx/encl.c
arch/x86/kernel/cpu/sgx/encl.h
arch/x86/kernel/cpu/sgx/ioctl.c [new file with mode: 0644]