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, 20 May 2015 21:12:15 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Borislav Petkov <bp@...e.de>
cc:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Ingo Molnar <mingo@...nel.org>, Huang Rui <ray.huang@....com>,
	Len Brown <lenb@...nel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>, x86@...nel.org,
	linux-kernel@...r.kernel.org,
	Fengguang Wu <fengguang.wu@...el.com>,
	Aaron Lu <aaron.lu@...el.com>, Tony Li <tony.li@....com>,
	Frédéric Weisbecker <fweisbec@...il.com>
Subject: Re: [RFC PATCH 2/4] x86, mwaitt: introduce mwaitx idle with a
 configurable timer

On Wed, 20 May 2015, Borislav Petkov wrote:

> On Wed, May 20, 2015 at 04:55:58PM +0100, One Thousand Gnomes wrote:
> > > That's not what appears to be happening here though: the MWAITX will 
> > > return after the timeout.
> > > 
> > > Which isn't really useful unless we use it to drive timers.
> > 
> > What about things like mdelay() ?
> 
> It has an upper limit on the max timeout though: u32 TSC cycles.

Which would be good enough for mdelay/udelay I think, but we'd need to
measure the time spend in MWAITT so we wont return early.

Something like this:

	  delay = usec_to_tsc(delay);
	  end = rdtsc() + delay;
	  while (1) {
		MWAITT(delay);
		now = rdtsc();
		if (end <= now)
		   	  break;
		delay = end - now;
	}

Now we'd need to add alternatives or some other mechanism to it to
make this conditionally for those machines.

Not sure if it's worth the trouble.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ