lkml.org 
[lkml]   [2017]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: linux-next: manual merge of the rcu tree with the tip tree
On Tue, Aug 1, 2017 at 7:02 AM, Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
> /*
> * The full memory barrier implied by mm_cpumask update operations
> * is required by the membarrier system call.
> */
>
> What we want to order here is:
>
> prev userspace memory accesses
> schedule
> <full mb> (it's already there) [A]
> update to rq->curr changing the rq->curr->mm value
> <full mb> (provided by mm_cpumask updates in switch_mm on x86) [B]

If I understand this right, the issue with relying on CR3 writes is
that the target CPU could switch to a kernel thread and back to the
same user mm white the membarrier caller is reading its mm, right?

\
 
 \ /
  Last update: 2017-08-01 16:16    [W:0.074 / U:2.920 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site