On Wed, Mar 18, 2020 at 01:07:48PM -0700, Sean Christopherson wrote: > On Wed, Mar 18, 2020 at 09:41:32PM +0200, Jarkko Sakkinen wrote: > > On Wed, Mar 18, 2020 at 09:40:06PM +0200, Jarkko Sakkinen wrote: > > > On Wed, Mar 18, 2020 at 09:03:16AM -0700, Sean Christopherson wrote: > > > > How on earth is someone doing to dredge up the above information without a > > > > comment? Anyone looking at this code without a priori knowledge of the > > > > development history will assume the missing synchronize_srcu() is a bug. > > > > > > By reading the source code of the driver obviously. > > > > Secondly, there is no development history. It is in epoch state. > > That's exactly my point. Unless someone knows to look through the > pre-historic threads in the intel_sgx mailing list they'll be clueless as > to why synchronizing the srcu when attaching a new mm to an enclave is a > bad idea. And give it a few years and we'll probably be asking ourselves > why there's no synchronize_sruc()... > > The locking rules between SGX and the core MMU are complex enough as it is, > I don't understand why we'd want to make our lives even more difficult. A six sentece paragraph is an overkill. BTW, is smp_wmb() necessary given that the code is strictly x86? x86 does not reorder writes on a core. /Jarkko