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:	Fri, 12 Aug 2016 14:16:09 -0700
From:	Dave Hansen <dave.hansen@...el.com>
To:	Andy Lutomirski <luto@...capital.net>,
	Waiman Long <waiman.long@....com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	John Stultz <john.stultz@...aro.org>,
	Ingo Molnar <mingo@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Borislav Petkov <bp@...e.de>,
	Jiang Liu <jiang.liu@...ux.intel.com>,
	Randy Wright <rwright@....com>,
	Scott J Norton <scott.norton@....com>,
	Douglas Hatch <doug.hatch@....com>,
	Prarit Bhargava <prarit@...hat.com>, X86 ML <x86@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [RESEND PATCH v4] x86/hpet: Reduce HPET counter read contention

On 08/12/2016 01:18 PM, Andy Lutomirski wrote:
> I don't think this is right.  If the HPET ever returns the same value
> twice in a row (unlikely because it's generally too slow to read, but
> it's plausible that someone will make a fast HPET some day), then this
> could deadlock.

True...

I guess that means we've got to do some kind of sequence counter
preferably in the same cacheline as the HPET value itself, or _something
that we guarantee to change on each write to the cached value.

> Also, does this code need to be NMI-safe?  This implementation is
> deadlocky if it's called from an NMI.

Urg.  Can't we just do

	if (in_nmi())
		return read_real_hpet();

?

> The original code was wait-free, right?  That was a nice property, too.

You mean no spins?  I don't think this one really spins ever either.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ