linux-sgx.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Nathaniel McCallum <npmccallum@redhat.com>,
	Cedric Xing <cedric.xing@intel.com>,
	Jethro Beekman <jethro@fortanix.com>,
	Andy Lutomirski <luto@amacapital.net>,
	linux-sgx@vger.kernel.org
Subject: Re: [PATCH for_v37 2/6] x86/vdso: x86/sgx: Rework __vdso_sgx_enter_enclave() API
Date: Fri, 4 Sep 2020 16:46:13 +0300	[thread overview]
Message-ID: <20200904134613.GG39023@linux.intel.com> (raw)
In-Reply-To: <20200904104437.29555-3-sean.j.christopherson@intel.com>

On Fri, Sep 04, 2020 at 03:44:33AM -0700, Sean Christopherson wrote:
> Rework __vdso_sgx_enter_enclave() to use a struct to hold the input and
> output params.  In the new struct, add an opaque "user_data" that can be
> used to pass context across the vDSO, an explicit "exit_reason" to avoid
> overloading the return value, and a "flags" field to provide a path for
> future extensions.
> 
> Moving the params into a struct will also make it less painful to use
> dedicated exit reasons values in a future patch.
> 
> Cc: Nathaniel McCallum <npmccallum@redhat.com>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

I like this a lot. Everything is now so much better tied together.

If I understood the change correctly this solution also addreses my
concerns of eBPF because 'flags' allows to change representation what
handler means (later on, if we ever want).

Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

  reply	other threads:[~2020-09-04 13:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 10:44 [PATCH for_v37 0/6] x86/vdso: x86/sgx: Rework SGX vDSO API Sean Christopherson
2020-09-04 10:44 ` [PATCH for_v37 1/6] x86/vdso: x86/sgx: Explicitly force 8-byte CMP for detecting user handler Sean Christopherson
2020-09-04 10:44 ` [PATCH for_v37 2/6] x86/vdso: x86/sgx: Rework __vdso_sgx_enter_enclave() API Sean Christopherson
2020-09-04 13:46   ` Jarkko Sakkinen [this message]
2020-09-04 10:44 ` [PATCH for_v37 3/6] x86/vdso: x86/sgx: Introduce dedicated SGX exit reasons for vDSO Sean Christopherson
2020-09-04 14:06   ` Jarkko Sakkinen
2020-09-04 10:44 ` [PATCH for_v37 4/6] selftests/sgx: Update the SGX selftest to match the reworked vDSO API Sean Christopherson
2020-09-04 14:07   ` Jarkko Sakkinen
2020-09-04 10:44 ` [PATCH for_v37 5/6] selftests/sgx: Sanity check the return value of the vDSO call Sean Christopherson
2020-09-04 14:07   ` Jarkko Sakkinen
2020-09-04 10:44 ` [PATCH for_v37 6/6] selftests/sgx: Add a smoke test to ensure the user handler is invoked Sean Christopherson
2020-09-04 14:10   ` Jarkko Sakkinen

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=20200904134613.GG39023@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=cedric.xing@intel.com \
    --cc=jethro@fortanix.com \
    --cc=linux-sgx@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=npmccallum@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).