x86/sgx: Adding eextend ioctl
PATCH 1/3 x86/sgx: Adding eextend ioctl
The current sgx driver can only launch enclaves that always measure 4K pages. That may not necessarily be the case. This patch adds an ioctl to enable users to add the enclave measurement per 256 byte.
--- arch/x86/include/uapi/asm/sgx.h | 11 ++++++ arch/x86/kernel/cpu/sgx/ioctl.c | 81 +++++++++++++++++++++++++++++++++++------ 2 files changed, 81 insertions(+), 11 deletions(-)
arch/x86/include/uapi/asm/sgx.h +11 -0
@@ -27,6 +27,8 @@ enum sgx_page_flags { _IOW(SGX_MAGIC, 0x02, struct sgx_enclave_init)#define SGX_IOC_ENCLAVE_PROVISION \ _IOW(SGX_MAGIC, 0x03, struct sgx_enclave_provision) +#define SGX_IOC_ENCLAVE_EXTEND \ + _IOW(SGX_MAGIC, 0x04, struct sgx_enclave_extend)/** * struct sgx_enclave_create - parameter structure for the
@@ -57,6 +59,15 @@ struct sgx_enclave_add_pages { };/** +* struct sgx_enclave_extend - parameter structure for the +* %SGX_IOC_ENCLAVE_MEASURE ioctl +* @offset: offset of the data from the start address for the data +*/ +struct sgx_enclave_extend { +__u64 offset; +}; + +/** * struct sgx_enclave_init - parameter structure for the * %SGX_IOC_ENCLAVE_INIT ioctl * @sigstruct: address for the SIGSTRUCT data
arch/x86/kernel/cpu/sgx/ioctl.c +70 -11
115 lines not on this page · raw message
Signature · 1 line
2.7.4
Jarkko Sakkinen
maintainerQuoted 3 lines · Raoul Strackx
The current sgx driver can only launch enclaves that always measure 4K pages. That may not necessarily be the case. This patch adds an ioctl to enable users to add the enclave measurement per 256 byte.
Please run scripts/checkpatch.pl. You cannot write a long description in a single line.
Also please write 'SGX' instead of 'sgx'.
I do understand the code change but also the current ioctl measure per 256 byte the full page. What I'm saying that the long description does not contain any information what this patch adds to that. It neither makes the case why it makes sense to have enclaves where full pages are not measured.
/Jarkko
Quoted 9 lines · Jarkko Sakkinen
Quoted 3 lines · Raoul Strackx
The current sgx driver can only launch enclaves that always measure 4K pages. That may not necessarily be the case. This patch adds an ioctl to enable users to add the enclave measurement per 256 byte.
Please run
scripts/checkpatch.pl. You cannot write a long description in a single lineAlso please write 'SGX' instead of 'sgx'
I've made the requested changes locally and will include them in the next version of the patch. I'm still very new to the Linux patch process. Thanks for understanding.
Quoted 4 lines
I do understand the code change but also the current ioctl measure per 256 byte the full page. What I'm saying that the long description does not contain any information what this patch adds to that. It neither makes the case why it makes sense to have enclaves where full pages are not measured.
Yes the description was too succinct. Dave Hansen had a similar comment. Let me reply to this in the email thread with all appropriate addressed people and mailing lists.
Regards,
Raoul