public inbox for linux-sgx@vger.kernel.org
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Jarkko Sakkinen <jarkko@kernel.org>, shuah@kernel.org
Cc: 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: Mon, 7 Jun 2021 09:35:25 -0700	[thread overview]
Message-ID: <da0c7ded-3fec-9b30-8955-7a2525dc1f22@intel.com> (raw)
In-Reply-To: <20210526124740.16783-2-jarkko@kernel.org>

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

  reply	other threads:[~2021-06-07 16:35 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 [this message]
2021-06-09 13:02     ` Jarkko Sakkinen
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=da0c7ded-3fec-9b30-8955-7a2525dc1f22@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=jarkko@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --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