[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210609130206.ezv5flznlb2g6wm7@kernel.org>
Date: Wed, 9 Jun 2021 16:02:06 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Reinette Chatre <reinette.chatre@...el.com>
Cc: shuah@...nel.org, linux-kselftest@...r.kernel.org,
linux-sgx@...r.kernel.org,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 2/4] selftests/sgx: Migrate to kselftest harness
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
Powered by blists - more mailing lists