All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: linux-sgx@vger.kernel.org
Subject: Re: [PATCH 1/2] x86/sgx: Remove duplicate check for entry->epc_page in sgx_encl_load_page()
Date: Thu, 22 Aug 2019 17:45:20 +0300	[thread overview]
Message-ID: <53356fc2b00d322f599a92a07d1ce83a66dc4df4.camel@linux.intel.com> (raw)
In-Reply-To: <20190822003358.GO29345@linux.intel.com>

On Wed, 2019-08-21 at 17:33 -0700, Sean Christopherson wrote:
> On Thu, Aug 22, 2019 at 02:29:01AM +0300, Jarkko Sakkinen wrote:
> > The existence of the page is checked first hand for legit race
> > conditions (either two or more concurrent threads running the #PF
> > handler or the reclaimer has taken over the page):
> > 
> > /* Page is already resident in the EPC. */
> > if (entry->epc_page) {
> > 	if (entry->desc & SGX_ENCL_PAGE_RECLAIMED)
> > 		return ERR_PTR(-EBUSY);
> > 
> > 	return entry;
> > }
> > 
> > After that the existence is a checked as a condition for ELDU.
> > 
> > This commit removes the redundant check.
> > 
> > Cc: Sean Christopherson <sean.j.christopherson@intel.com>
> > Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> > ---
> 
> Ha, I remember seeing this a while back and completely forgot about it.
> 
> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>

[I guess for this ack-by would be appropriate as they are not mainline
patches]

Thanks Sean. These kind of regression are almost unavoidable because of
heavy rebasing...

/Jarkko


  reply	other threads:[~2019-08-22 14:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 23:29 [PATCH 0/2] v22 fixes Jarkko Sakkinen
2019-08-21 23:29 ` [PATCH 1/2] x86/sgx: Remove duplicate check for entry->epc_page in sgx_encl_load_page() Jarkko Sakkinen
2019-08-22  0:33   ` Sean Christopherson
2019-08-22 14:45     ` Jarkko Sakkinen [this message]
2019-08-21 23:29 ` [PATCH 2/2] x86/sgx: Determine SECS at compile time in sgx_encl_eldu() Jarkko Sakkinen
2019-08-22  0:55   ` Sean Christopherson
2019-08-22 14:55     ` 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=53356fc2b00d322f599a92a07d1ce83a66dc4df4.camel@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=linux-sgx@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.