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]
Date:	Thu, 7 Apr 2016 17:24:32 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...hat.com>,
	Paul Turner <commonly@...il.com>,
	Andi Kleen <andi@...stfloor.org>, Chris Lameter <cl@...ux.com>,
	Dave Watson <davejwatson@...com>,
	Josh Triplett <josh@...htriplett.org>,
	Linux API <linux-api@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Hunter <ahh@...gle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [RFC PATCH 0/3] restartable sequences v2: fast user-space percpu
 critical sections

On Thu, Apr 07, 2016 at 07:35:26AM -0700, Andy Lutomirski wrote:
> What I meant was: rather than shoving individual values into the TLABI
> thing, shove in a pointer:
> 
> struct commit_info {
>   u64 post_commit_rip;
>   u32 cpu;
>   u64 *event;
>   // whatever else;
> };
> 
> and then put a commit_info* in TLABI.
> 
> This would save some bytes in the TLABI structure.

But would cost us extra indirections. The whole point was getting this
stuff at a constant offset from the TLS segment register.

> > So letting the user manage the event is doable, but it would still be
> > advisable to have the event in the same shared word.
> >
> 
> Why is a single load needed?  The event and CPU in the TLABI structure
> are only ever accessed from the thread in question.

Its not required, but being able to do a single load saves on cycles,
less cycles is more good.

> That way we could take an async signal, handle it, and resume, even in
> the middle of a commit, without aborting.  Of course, if the signal
> hander tried to access the same rseq-protected resource, it would bump
> the event counter and cause an abort.

Ah, so what happens if the signal happens before the commit but after
the load of the seqcount?

Then, even if the signal motifies the count, we'll not observe.

Powered by blists - more mailing lists