On Mon, Jun 07, 2021 at 09:35:25AM -0700, Reinette Chatre wrote:
Hi Jarkko,
On 5/26/2021 5:47 AM, Jarkko Sakkinen wrote:
...
- exit(KSFT_PASS);
+static inline int encl_call(const void *in, void *out, struct sgx_enclave_run *run, bool clobbered) +{
- void *in2 = (void *)in;
- int ret;
-err:
- encl_delete(&encl);
- exit(KSFT_FAIL);
- if (clobbered)
ret = vdso_sgx_enter_enclave((unsigned long)in2, (unsigned long)out, 0,
EENTER, 0, 0, run);
- else
ret = sgx_enter_enclave(in2, out, 0, EENTER, NULL, NULL, run);
- return ret;
+}
I find this change unnecessary because it is very specific to the current test cases and limiting future test cases. From what I understand it attempts to create a generic "call into the enclave" wrapper but in doing so it constrains the call to use only two registers, assuming there will always and only be just an "in" and "out" parameter needed.
Reinette
Thank you, good catch, it should be a macro. I'll turn in such.
Other than that, it does not limit anything as we are talking neither API or ABI.
/Jarkko