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, 9 Jun 2016 13:21:18 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Borislav Petkov <bp@...e.de>, Minfei Huang <mnghuan@...il.com>
Cc:	luto@...nel.org, hpa@...or.com, mingo@...hat.com,
	tglx@...utronix.de, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3 V2] pvclock: Get rid of __pvclock_read_cycles in
 function pvclock_read_flags



On 08/06/2016 10:17, Borislav Petkov wrote:
>> > -		version = __pvclock_read_cycles(src, &ret, &flags);
>> > +		version = src->version;
>> > +		/* Make the latest version visible */
>> > +		smp_rmb();
>> > +
>> > +		flags = src->flags;
>> >  		/* Make sure that the version double-check is last. */
> What does that comment mean over the barrier? It should be over the
> "while" line IMO.
> 
>> >  		smp_rmb();
> Why the two barriers back-to-back? Can't have one at the end for all?
> 

This is basically implementing a seqcount.  It needs two barriers and,
technically, they should be virt_rmb() -- it really doesn't matter of
course because reads are never reordered on x86.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ