public inbox for linux-sgx@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: shuah@kernel.org, linux-kselftest@vger.kernel.org,
	linux-sgx@vger.kernel.org,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/4] selftests/sgx: Migrate to kselftest harness
Date: Wed, 9 Jun 2021 16:02:06 +0300	[thread overview]
Message-ID: <20210609130206.ezv5flznlb2g6wm7@kernel.org> (raw)
In-Reply-To: <da0c7ded-3fec-9b30-8955-7a2525dc1f22@intel.com>

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

  reply	other threads:[~2021-06-09 13:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 12:47 [PATCH v7 1/4] selftests/sgx: Rename 'eenter' and 'sgx_call_vdso' Jarkko Sakkinen
2021-05-26 12:47 ` [PATCH v7 2/4] selftests/sgx: Migrate to kselftest harness Jarkko Sakkinen
2021-06-07 16:35   ` Reinette Chatre
2021-06-09 13:02     ` Jarkko Sakkinen [this message]
2021-05-26 12:47 ` [PATCH v7 3/4] selftests/sgx: Dump enclave memory map Jarkko Sakkinen
2021-05-26 12:47 ` [PATCH v7 4/4] selftests/sgx: Add EXPECT_EEXIT() macro Jarkko Sakkinen
2021-06-07 16:28 ` [PATCH v7 1/4] selftests/sgx: Rename 'eenter' and 'sgx_call_vdso' Reinette Chatre
2021-06-09 13:00   ` Jarkko Sakkinen
2021-06-09 21:02     ` Reinette Chatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210609130206.ezv5flznlb2g6wm7@kernel.org \
    --to=jarkko@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox