On Wed, Oct 16, 2019 at 01:19:56PM +0300, Jarkko Sakkinen wrote: > On Wed, Oct 16, 2019 at 01:17:23PM +0300, Jarkko Sakkinen wrote: > > On Mon, Oct 14, 2019 at 04:31:28PM -0700, Sean Christopherson wrote: > > > I don't mind taking this to v23 review, but what do you mean by robustness > > > in this context? > > > > I think I kind of got this together API-wise: > > > > #define SGX_ENCLAVE_ADD_PAGES_MEASURE 1 > > > > struct sgx_enclave_add_pages { > > __u64 src; > > __u64 offset; > > __u64 length; > > __u64 secinfo; > > }; > > > > Length can be anything as long as low 8 bits are zero. The area > > defined by offset and length is measured when > > SGX_ENCLAVE_ADD_PAGES_MEASURE is set to 1. > > > > I think this is the most sane API so far and does fulfill Jethro's > > concerns why he originally wanted mrmask. I think this what most > > users would find the most intuitive API. > > > > Jethro, do you think you could live with this? > > This just a version of Sean's API but with sane defaults for mrmask. Now that mrmask is rendered out the general idea of defining continuous regions rather than scattered arrays of descriptors is superior. And it is also obvious that a single page ioctl would be ugly glitch even if it wouldn't cause harm. /Jarkko