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: linux-sgx@vger.kernel.org, Haitao Huang <haitao.huang@linux.intel.com>
Subject: Re: [PATCH v2] x86/sgx: Fix deadlock and race conditions between fork() and EPC reclaim
Date: Sat, 4 Apr 2020 04:12:02 +0300	[thread overview]
Message-ID: <20200404010948.GA24717@linux.intel.com> (raw)
In-Reply-To: <20200403234239.GJ2701@linux.intel.com>

On Fri, Apr 03, 2020 at 04:42:39PM -0700, Sean Christopherson wrote:
> On Fri, Apr 03, 2020 at 12:35:50PM +0300, Jarkko Sakkinen wrote:
> > From: Sean Christopherson <sean.j.christopherson@intel.com>
> > @@ -221,12 +224,16 @@ int sgx_encl_mm_add(struct sgx_encl *encl, struct mm_struct *mm)
> >  		return ret;
> >  	}
> >  
> > +	/*
> > +	 * The page reclaimer uses list version for synchronization instead of
> > +	 * synchronize_scru() because otherwise we could conflict with
> > +	 * dup_mmap().
> > +	 */
> >  	spin_lock(&encl->mm_lock);
> >  	list_add_rcu(&encl_mm->list, &encl->mm_list);
> 
> You dropped the smp_wmb().

As I said to you in my review x86 pipeline does not reorder writes.

/Jarkko

  reply	other threads:[~2020-04-04  1:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03  9:35 [PATCH v2] x86/sgx: Fix deadlock and race conditions between fork() and EPC reclaim Jarkko Sakkinen
2020-04-03 23:33 ` Jarkko Sakkinen
2020-04-03 23:35   ` Sean Christopherson
2020-04-04  1:12     ` Jarkko Sakkinen
2020-04-06 14:31       ` Sean Christopherson
2020-04-06 14:44         ` Sean Christopherson
2020-04-03 23:42 ` Sean Christopherson
2020-04-04  1:12   ` Jarkko Sakkinen [this message]
2020-04-06 14:36     ` Sean Christopherson
2020-04-06 17:10       ` Jarkko Sakkinen
2020-04-06 17:15         ` Jarkko Sakkinen
2020-04-09 19:13           ` Sean Christopherson
2020-04-10 13:22             ` 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=20200404010948.GA24717@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=haitao.huang@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 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).