lkml.org 
[lkml]   [2020]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] membarrier: add MEMBARRIER_CMD_PRIVATE_RESTART_RSEQ_ON_CPU
On Thu, Aug 6, 2020 at 6:48 AM <peterz@infradead.org> wrote:
>
> On Wed, Aug 05, 2020 at 05:08:58PM -0700, Peter Oskolkov wrote:
>
> Thanks for the Cc!

Always a pleasure!

(Sorry, included only membarrier maintainers in v1; in v2 included
both membarrier and rseq maintainers).

>
> > + * @MEMBARRIER_CMD_PRIVATE_RESTART_RSEQ_ON_CPU:
> > + * If a thread belonging to the current process
> > + * is currently in an RSEQ critical section on the
> > + * CPU identified by flags parameter, restart it.
> > + * @flags: if @flags >= 0, identifies the CPU to
> > + * restart RSEQ CS on; if == -1, restarts
> > + * RSEQ CSs on all CPUs.
>
> > + } else if (cpu_id == -1) {
> > + on_each_cpu(membarrier_rseq_ipi,
> > + current->group_leader, true);
>
> This is an unpriv IPI the world. That's a big no-no.

removed in v2.

>
> Double so because all you want to target is the current process, which
> you're defining as CLONE_THREAD, where the rest of this file uses
> CLONE_VM to define a process.

Use current->mm in v2 instead of current->group_leader. Is it better this way?

\
 
 \ /
  Last update: 2020-08-06 19:09    [W:0.049 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site