This post is directed to f0dder or all other knowledgeable coder pertaining to the subject of why not to use Ring0 when writing programs for any, and all, Windows operating systems.

I am hoping that this post to be an reference for all coders as well as myself to mainly address the reasons, of why not's.

Happy Coding

Posted on 2002-01-31 17:43:43 by cmax
What do you mean "why not" ?
switching protection rings isnt something you do on a whim, you really need a reason and you also need a driver :)
Posted on 2002-01-31 18:27:16 by Noodle
you CANT get into ring-0 under Windows NT/200/XP ..... and, of course, Windows9x/ME will die soon ...

to be or not to be (compatible)
Posted on 2002-01-31 18:42:50 by elmenda
Actually you can :)
map a view of the physical page that holds IDT or GDT and create a call gate, of course it only works in admin mode, and besides that not good coding practice.
Apart from call or interrupt gates you always have the option of writing a driver, which is the correct way to execute priviliged code in any OS be it 9x or NT
Posted on 2002-01-31 19:00:45 by Noodle
I think use some kind of hack (callgates, etc) is an error ... VXD is THE way.
Posted on 2002-01-31 19:11:53 by elmenda
1. There are no vxd's in NT (vxd is LE kmd is PE)
2. The OS also use gates to switch cpl since its the only way to do so. (with the exception of sysenter and sysexit which are special case instructions that override security checks)
but using gates in your own code is mainly done for quick access to system areas or priviliged instructions and usually used by virus writers.
But its not an error its a processor feature, using it manually is just very bad coding practice
Posted on 2002-01-31 19:26:16 by Noodle