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
| ||
|
Message-ID: <alpine.DEB.2.20.1804021000290.23911@nuc-kabylake> Date: Mon, 2 Apr 2018 10:03:58 -0500 (CDT) From: Christopher Lameter <cl@...ux.com> To: Alan Cox <gnomes@...rguk.ukuu.org.uk> cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Peter Zijlstra <peterz@...radead.org>, "Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>, 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 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. Hardware Execution Context? > > 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).
Powered by blists - more mailing lists