lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFTs51Ufyds5mypiysL=2ZwtyMk9hjLm-9tJbYz=xciY1f2=5g@mail.gmail.com>
Date:   Thu, 6 Aug 2020 10:07:53 -0700
From:   Peter Oskolkov <posk@...k.io>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Peter Oskolkov <posk@...gle.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Paul Turner <pjt@...gle.com>,
        Chris Kennelly <ckennelly@...gle.com>
Subject: Re: [PATCH 1/2] membarrier: add MEMBARRIER_CMD_PRIVATE_RESTART_RSEQ_ON_CPU

On Thu, Aug 6, 2020 at 6:48 AM <peterz@...radead.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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ