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:	Sat, 15 May 2010 09:48:26 -0700
From:	Venkatesh Pallipadi <venki@...gle.com>
To:	Dan Magenheimer <dan.magenheimer@...cle.com>
Cc:	Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, chris.mason@...cle.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Export tsc related information in sysfs

On Sat, May 15, 2010 at 6:29 AM, Dan Magenheimer
<dan.magenheimer@...cle.com> wrote:
>> From: Andi Kleen [mailto:andi@...stfloor.org]
>>
>> > Kernel information about calibrated value of tsc_khz and
>> > tsc_stability (result of tsc warp test) are useful bits of
>> information
>> > for any app that wants to use TSC directly. Export this read_only
>> > information in sysfs.
>>
>> Is this really a good idea?  It will encourage the applications
>> to use RDTSC directly, but there are all kinds of constraints on
>
> Indeed, that is what it is intended to do.
>
>> that. Even the kernel has a hard time with them, how likely
>> is it that applications will get all that right?
>
> That's the point of exposing the tsc_reliable kernel data.
> If the processor has Invariant TSC and the system has
> successfully passed Ingo's warp test and, as a result
> the kernel is using TSC as a clocksource, why not enable
> userland apps that need to obtain timestamp data
> tens or hundreds of thousands of times per second to
> also use the TSC directly?
>

I am a little concerned about applications getting this right, with
rdtsc and related barriers etc. May be that calls for a userspace
library.

Despite of that, it is useful information to human user to know
whether tsc is stable and what TSC freq is. It will be very hard for
userspace to do the TSC calibration. And to know whether TSC warp test
passed or whether TSC is marked unstable by the kernel, there is no
one place to get these answers today. Users have to look at
clocksource, dmesg, etc.

Thanks,
Venki
--
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