Ring Architecture

Intel Software Network Support
Total Points:
3,808
Status Points:
3,308
Brown Belt
November 8, 2006 6:18 PM PST
Rate
 
#1

We forwarded your question to our application engineering team.  One engineer responds:

You should re-read Section 4.8, 4.8.3 and 4.9 of "Intel® 64 and IA-32 Architectures Software Developer's Manual, Volume 3A: System Programming Guide, Part 1". I presume that you are IA-32 and using Call Gates SYSENTER/SYSEXIT and not IA-32e and using SYSCALL/SYSRET. A call-gate descriptor will reside in the GDT or in a LDT and the only way to affect these are through use of privileged instructions, LGDT and LLDT, which are protected from use by application programs.
 
"The privileged instructions control system functions (such as the loading of system registers). They can be executed only when the CPL is 0 (most privileged). If one of these instructions is executed when the CPL is not 0, a general-protection exception (#GP) is generated."
 
"To access a call gate, a far pointer to the gate is provided as a target operand in a CALL or JMP instruction. The segment selector from this pointer identifies the call gate; the offset from the pointer is required, but not used or checked by the processor. When the processor has accessed the call gate, it uses the segment selector from the call gate to locate the segment descriptor for the destination code segment. This segment descriptor can be in the GDT or the LDT. It then combines the base address from the code-segment descriptor with the offset from the call gate to form the linear address of the procedure entry point in the code segment."
 
So while you can munge together any GDT/LDT of your choosing, one cannot load the table and thus affect privileged state unless you were already at ring 0.

==

Lexi S.

Intel(R) Software Network Support

http://www.intel.co m/software

Contact us

 



Intel Software Network Forums Statistics

8470 users have contributed to 31601 threads and 100640 posts to date.
In the past 24 hours, we have 31 new thread(s) 110 new posts(s), and 153 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member kopernikus