All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for_v23] x86/sgx: Update stale function comments for ioctl handlers
@ 2019-10-08  4:17 Sean Christopherson
  0 siblings, 0 replies; only message in thread
From: Sean Christopherson @ 2019-10-08  4:17 UTC (permalink / raw)
  To: Jarkko Sakkinen; +Cc: linux-sgx

Update the ioctl handler comments to reflect reality.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kernel/cpu/sgx/ioctl.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/cpu/sgx/ioctl.c b/arch/x86/kernel/cpu/sgx/ioctl.c
index 75f868bad3ea..6567680b1a50 100644
--- a/arch/x86/kernel/cpu/sgx/ioctl.c
+++ b/arch/x86/kernel/cpu/sgx/ioctl.c
@@ -235,11 +235,11 @@ static int sgx_encl_create(struct sgx_encl *encl, struct sgx_secs *secs)
 
 /**
  * sgx_ioc_enclave_create - handler for %SGX_IOC_ENCLAVE_CREATE
- * @filep:	open file to /dev/sgx
+ * @encl:	pointer to an enclave instance (via ioctl() file pointer)
  * @arg:	userspace pointer to a struct sgx_enclave_create instance
  *
- * Allocate kernel data structures for a new enclave and execute ECREATE after
- * verifying the correctness of the provided SECS.
+ * Allocate kernel data structures for the enclave, verify the correctness of
+ * the provided SECS, and execute ECREATE.
  *
  * Note, enforcement of restricted and disallowed attributes is deferred until
  * sgx_ioc_enclave_init(), only the architectural correctness of the SECS is
@@ -444,7 +444,7 @@ static int sgx_encl_add_page(struct sgx_encl *encl,
 
 /**
  * sgx_ioc_enclave_add_page() - The handler for %SGX_IOC_ENCLAVE_ADD_PAGE
- * @filep:	open file to /dev/sgx
+ * @encl:	pointer to an enclave instance (via ioctl() file pointer)
  * @arg:	a user pointer to a struct sgx_enclave_add_page instance
  *
  * Add (EADD) a page to an uninitialized enclave, and optionally extend
@@ -591,11 +591,14 @@ static int sgx_encl_init(struct sgx_encl *encl, struct sgx_sigstruct *sigstruct,
 
 /**
  * sgx_ioc_enclave_init - handler for %SGX_IOC_ENCLAVE_INIT
- *
- * @filep:	open file to /dev/sgx
+ * @encl:	pointer to an enclave instance (via ioctl() file pointer)
  * @arg:	userspace pointer to a struct sgx_enclave_init instance
  *
- * Flush any outstanding enqueued EADD operations and perform EINIT.  The
+ * Check that the required attributes for the enclave have been authorized, and
+ * execute EINIT to initialize an enclave and make it runnable.  Success is not
+ * guaranteed even if all inputs are valid as EINIT is interruptible, i.e. the
+ * CPU may abort EINIT to service a pending interrupt.
+ *
  * Launch Enclave Public Key Hash MSRs are rewritten as necessary to match
  * the enclave's MRSIGNER, which is caculated from the provided sigstruct.
  *
@@ -643,7 +646,7 @@ static long sgx_ioc_enclave_init(struct sgx_encl *encl, void __user *arg)
 
 /**
  * sgx_ioc_enclave_set_attribute - handler for %SGX_IOC_ENCLAVE_SET_ATTRIBUTE
- * @filep:	open file to /dev/sgx
+ * @encl:	pointer to an enclave instance (via ioctl() file pointer)
  * @arg:	userspace pointer to a struct sgx_enclave_set_attribute instance
  *
  * Mark the enclave as being allowed to access a restricted attribute bit.
-- 
2.22.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-08  4:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08  4:17 [PATCH for_v23] x86/sgx: Update stale function comments for ioctl handlers Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.