lkml.org 
[lkml]   [1999]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Fetching a value of control registers from user space
From
Date
Thanks everybody who responsed to my question.

Richard B. Johnson (root@chaos.analogic.com) wrote:
> Quote: (Intel 26-212)
> MOV to/from Special Registers.
> #GP(0) if current privilege level is not 0.
> This is a general protection violation. No user-mode program would
> (should) ever use these instructions.

Oh, I see.

I thought otherwise because of the following paragraph in the Intel
Programmer's Manual for i486 which I've downloaded perhaps a year ago from
Intel's site:

Chapter 2, System Architecture Overview

2.5. CONTROL REGISTERS
...
In protected mode, the move-to-or-from-control-registers forms of the MOV
instruction allow the control registers to be read (at any privilege
level) or loaded (at privilege level 0 only). This restriction means that
application programs (running at privilege levels 1, 2, or 3) are
prevented from loading the control registers; however, application
programs can read these registers. For example, an application might need
to read register CR0 to determine if an FPU is present.
...

Regards,
--
| Josip Gracin
| Zagreb, Croatia

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

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