lkml.org 
[lkml]   [1997]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86 MSRs - example program
On Fri, 28 Feb 1997, Philippe Strauss wrote:
> Reading some doco about RDTSC and RDMSR, I just learn that RDTSC is only
> available in ring 0.. (At least Therje Matiesen wrote that in his Byte
> article). I'm using RDTSC from user space since a while in a FFT
> benchmarking software, i just wonder how it is possible ?
>
> my software can be found here:
> ftp://sicel-home-1-4.urbanet.ch/pub/XSpectrum-1.1.tar.gz
>
> Needless to say that i own an intel pentium.

This is from an Intel manual:
In the special register "cr4" bit number 3 decides over this.
If the bit is set (orl $4,%%cr4), executing RDTSC in any cpl!=0 gives a
GPF. IMHO this should be done in ./arch/i386/kernel/head.S or setup.c .
Maybe I'm being paranoid here, but this could be a security hole of some
type.

Cheers, Stephan



\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.046 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site