privilege levels types

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
firas981

privilege levels types

Post by firas981 »

there are several previlege level types in IA-32 , I got confused :
Selector privilege level .
Descriptor Privilege Level .
The user/supervisor bit in page table entry and page directory entry .


My Qs are :

1 ) what is the exact relationship between them ?
2 ) I have an idea (speaking in IA-32 )that supervisor mode is the ring zero privilege level , user mode is the rings 1,2,3
   is this true ?
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:privilege levels types

Post by Candy »

firas981 wrote: My Qs are :

1 ) what is the exact relationship between them ?
ehm... that's subject of at least a dozen threads here, dozens of books and free manuals all around the world, and a lot of tutorials since there are still some people that need more. Did you read/find those?
2 ) I have an idea (speaking in IA-32 )that supervisor mode is the ring zero privilege level , user mode is the rings 1,2,3
is this true ?
No. The mapping between paging U/S and segmentation 0-3 is that 0-2 is supervisor and 3 is user. User space are programs that don't do protection actively, so why give them more than 1 level?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:privilege levels types

Post by Pype.Clicker »

http://www.mega-tokyo.com/forum/index.p ... 57;start=0
may help figuring out what those *PL are ...

@the 4 levels of protection, the two 'intermediate' levels were meant for third-party drivers ... keep in mind that these have been defined on the 286 where there was no paging at all. Only DPL0 can theorically access the GDT and define new segments, so any other DPL only works in a level-0 defined environment. DPL1 or DPL2 code has the ability to do IO things that DPL3 couldn't (if the system designer wishes so) by the adjustment of the IOPL field ...

In practice, it has seldom be used because the SU-vs-world unix approach has been more elegant and easier to use ...
Post Reply