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: <20180402152736.GL3948@linux.vnet.ibm.com>
Date:   Mon, 2 Apr 2018 08:27:36 -0700
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Christopher Lameter <cl@...ux.com>
Cc:     Alan Cox <gnomes@...rguk.ukuu.org.uk>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Boqun Feng <boqun.feng@...il.com>,
        Andy Lutomirski <luto@...capital.net>,
        Dave Watson <davejwatson@...com>, linux-kernel@...r.kernel.org,
        linux-api@...r.kernel.org, Paul Turner <pjt@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Russell King <linux@....linux.org.uk>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, Andrew Hunter <ahh@...gle.com>,
        Andi Kleen <andi@...stfloor.org>, Ben Maurer <bmaurer@...com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Josh Triplett <josh@...htriplett.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will.deacon@....com>,
        Michael Kerrisk <mtk.manpages@...il.com>,
        Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [RFC PATCH for 4.17 02/21] rseq: Introduce restartable sequences
 system call (v12)

On Mon, Apr 02, 2018 at 10:03:58AM -0500, Christopher Lameter wrote:
> On Sun, 1 Apr 2018, Alan Cox wrote:
> 
> > >        Restartable sequences are atomic  with  respect  to  preemption
> > >        (making  it atomic with respect to other threads running on the
> > >        same CPU), as well as  signal  delivery  (user-space  execution
> > >        contexts nested over the same thread).
> >
> > CPU generally means 'big lump with legs on it'. You are not atomic to the
> > same CPU, because that CPU may have 30+ cores with 8 threads per core.
> >
> > It could do with some better terminology (hardware thread, CPU context ?)
> 
> Well we call it a "CPU" in the scheduler context I think.  We could use
> better terminology throughout the kernel tools and source.

Agreed, it has been "CPU" for "single hardware thread" for a very long
time.  People tend to use "core" for "group of hardware threads" and
"socket" for "big lump with legs on it".

> Hardware Execution Context?

Should be even more fun when non-CPU hardware execution contexts show
up in force within each core.  ;-)

But the terminology in place for non-CPU hardware execution contexts
should be able to survive that event.

> > >        In  a  typical  usage scenario, the thread registering the rseq
> > >        structure will be performing  loads  and  stores  from/to  that
> > >        structure.  It  is  however also allowed to read that structure
> > >        from other threads.  The rseq field updates  performed  by  the
> > >        kernel  provide  relaxed  atomicity  semantics, which guarantee
> > >        that other threads performing relaxed atomic reads of  the  cpu
> > >        number cache will always observe a consistent value.
> >
> > So what happens to your API if the kernel atomics get improved ? You are
> > effectively exporting rseq behaviour from private to public.
> 
> There is already a pretty complex coherency model guiding kernel atomics.
> Improvements/changes to that are difficult and the effect will ripple
> throughout the kernel. So I would suggest that these areas of the kernel
> are pretty "petrified" (or written in stone).

I suspect that there are much more pressing areas of confusion in any
case!

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ