GDT conform bit
Posted: Wed Apr 06, 2011 9:07 pm
Can someone explain this to me in slightly greater detail:
(From http://wiki.osdev.org/GDT)
Were the opposite true as the above suggests, would this not mean that userland processes could access kernel mode code, but not the other way around?
(From http://wiki.osdev.org/GDT)
This seems to be at odds with my understanding of x86 privilege levels, 0 being the highest privileged, 3 lowest. I assumed that code from ring 0 could jump wherever the heck it liked, while ring 3 could only jump to another ring 3 conforming segment, rings 1 and 2 to various levels in between.If 1 code in this segment can be executed from an equal or lower privilege level. For example, code in ring 3 can far-jump to conforming code in a ring 2 segment. The privl-bits represent the highest privilege level that is allowed to execute the segment. For example, code in ring 0 cannot far-jump to a conforming code segment with privl==0x2, while code in ring 2 and 3 can. Note that the privilege level remains the same, ie. a far-jump form ring 3 to a privl==2-segment remains in ring 3 after the jump.
Were the opposite true as the above suggests, would this not mean that userland processes could access kernel mode code, but not the other way around?