Re: [PATCH v7 2/4] selftests/sgx: Migrate to kselftest harness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux