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]
Message-ID: <4DDD7D9E.60100@kasperkp.dk>
Date:	Thu, 26 May 2011 00:07:26 +0200
From:	Kasper Pedersen <kkp2010@...perkp.dk>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	linux-kernel@...r.kernel.org,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	John Stultz <johnstul@...ibm.com>, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
	Josh Triplett <josh@...htriplett.org>
Subject: Re: [PATCH v3] x86: tsc: make TSC calibration immune to interrupts

On 05/25/2011 12:51 PM, Thomas Gleixner wrote:
>> The 8 additional samples costs us 28 microseconds in startup
>> time.
> 
> That's a good reason to avoid the whole conditional thing and just do
> the best of 5 always.

I do not mind removing it again.
The additional 170us only happen when quick_pit_calibrate fails,
and then native_calibrate_tsc burns 30ms extra anyway.

>> +
>> +	*p = tp;
> 
> The value is completely uninteresting when we return ULLONG_MAX.
> 

native_calibrate_tsc() depends on *p being written regardless of
whether we can get a SMI-free reading:

	/* We don't have an alternative source, disable TSC */
	if (!hpet && !ref1 && !ref2) {
		printk("TSC: No reference (HPET/PMTIMER) available\n");
		return 0;
	}

this works since acpi_pm_read_early() returns 0 when pmtmr_ioport 
is 0, or CONFIG_X86_PM_TIMER is not set.

Without it we would report "calibration failed" rather than 
"No reference" or "Using PIT" when there is neither pmtimer nor 
hpet.

/Kasper Pedersen
--
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