Linux-Sgx Archive on lore.kernel.org
 help / color / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: linux-sgx@vger.kernel.org
Subject: Re: [PATCH for v24 v2 1/4] x86/sgx: Destroy enclave if EADD fails
Date: Tue, 5 Nov 2019 14:58:33 -0800
Message-ID: <20191105225833.GD23297@linux.intel.com> (raw)
In-Reply-To: <20191105112056.21452-1-jarkko.sakkinen@linux.intel.com>

On Tue, Nov 05, 2019 at 01:20:53PM +0200, Jarkko Sakkinen wrote:
> __sgx_encl_add_page() can only fail in the case of EPCM conflict at least
> in non-artificial situations. Also, it consistent semantics in rollback is
> something to pursue for. Thus, destroy enclave when the EADD fails as we do
> when EEXTEND fails already.

I still don't understand the motiviation for this change, EADD can fault
and fail for reasons that are purely under userspace control.  Yes, it's
all but guaranteed to be a userspace bug, but I can't think of another
instance in the kernel where the reaction to what is effectively an invalid
param is to torch the whole thing.  EEXTEND is special cased because the
kernel doesn't have any other sane choice.

  parent reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05 11:20 Jarkko Sakkinen
2019-11-05 11:20 ` [PATCH for v24 v2 2/4] x86/sgx: Remove a subordinate clause Jarkko Sakkinen
2019-11-06 22:03   ` Jarkko Sakkinen
2019-11-05 11:20 ` [PATCH for v24 v2 3/4] x86/sgx: Detach sgx_encl_add_page() from struct sgx_enclave_add_pages Jarkko Sakkinen
2019-11-05 11:20 ` [PATCH for v24 v2 4/4] x86/sgx: add @count to &sgx_enclave_add_pages Jarkko Sakkinen
2019-11-05 22:52   ` Sean Christopherson
2019-11-06 23:20     ` Jarkko Sakkinen
2019-11-08  8:13       ` Jarkko Sakkinen
2019-11-05 22:58 ` Sean Christopherson [this message]
2019-11-06 23:26   ` [PATCH for v24 v2 1/4] x86/sgx: Destroy enclave if EADD fails Jarkko Sakkinen

Reply instructions:

You may reply publically 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=20191105225833.GD23297@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-sgx@vger.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

Linux-Sgx Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sgx/0 linux-sgx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sgx linux-sgx/ https://lore.kernel.org/linux-sgx \
		linux-sgx@vger.kernel.org
	public-inbox-index linux-sgx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sgx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git