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, 26 Apr 2008 17:29:12 -0700 (PDT)
From:	dean gaudet <dean@...tic.org>
To:	"H. Peter Anvin" <hpa@...or.com>
cc:	Erik Bosman <ejbosman@...vu.nl>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Andrea Arcangeli <andrea@...share.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Arjan van de Ven <arjan@...radead.org>
Subject: Re: [PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC

On Sat, 26 Apr 2008, H. Peter Anvin wrote:

> dean gaudet wrote:
> > On Sat, 26 Apr 2008, H. Peter Anvin wrote:
> > 
> > > dean gaudet wrote:
> > > > i might be too late... but shouldn't these #defines be PR_SET_RDTSC and
> > > > PR_GET_RDTSC or something like that?
> > > > 
> > > > to me calling them PR_SET_TSC/PR_GET_TSC just seem like alternative ways
> > > > to
> > > > change/get the TSC (and could even reduce to portable TSC
> > > > implementations...
> > > > since such registers do exist on other architectures).
> > > > 
> > > I would argue no, the flag is "is the TSC available".  RDTSC is an
> > > x86-specific name and would map poorly onto other architectures.
> > 
> > yeah but "SET TSC" to me reads as "set the TSC".... i read nothing about
> > making some instruction available or not.
> > 
> > although clock_gettime/clock_settime could more natural APIs for such
> > things.
> > 
> 
> PR_SET/PR_GET are the common prefixes, though.

that's not what's at issue... "PR_SET_TSC" reads "set the TSC" ... it 
doesn't read "set the ability to use the rdtsc instruction". 
PR_SET_RDTSC_ENABLE would seem to be more accurate... or even 
PR_SET_CR4_TSD which is what it really does :)

-dean
--
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