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:	Wed, 11 May 2016 16:24:37 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Andy Lutomirski <luto@...capital.net>, Borislav Petkov <bp@...e.de>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, X86 ML <x86@...nel.org>,
	Minfei Huang <mnghuan@...il.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] Cleanup __pvclock_read_cycles to remove useless variables



On 30/04/2016 23:57, Andy Lutomirski wrote:
>> > Should we kill __pvclock_read_cycles in favor of vread_pvclock? It looks
>> > doable at a quick scan...
>> >
> The in-kernel version might have to be a bit different because it
> needs to handle the !stable case.  If !stable, it should just use the
> current CPU's copy which means that, realistically, it should just
> get_cpu and use the local copy unconditionally.  Other than that, it
> could look a lot like the vread_pvclock variant.
> 
> But I agree, the current thing is incomprehensible.

It also lacks smp_rmb()s.  One is more or less implicit in rdtsc, but
you need one to separate __pvclock_read_cycles's reads of src->foo from
pvclock_read_flags's read of src->version.

Minfei, would you like to take a look?

Paolo

Powered by blists - more mailing lists