Re: Rings 1 and 2
Posted: Mon Jan 26, 2009 8:17 pm
It would allow me to set the IOPL above ring 3, permanently -- just to provide that much extra security between userland and things it shouldn't have access to.
You didn't understand what I was asking. I got that guest ring 0 stuff goes at ring 1 on the physical machine. But if the guest OS also uses ring 1, where does that go? Ring 1 (that could trash the guest OS), ring 2 (that would be bad as the guest machine wouldn't have as many rings if you tried to run Virtual PC in Virtual PC; you'd run out of rings) or ring 3 (would that work?)?jal wrote:The guest OS is running in ring 1. And I suppose the guest code is still running in ring 3, supposing also that the guest OS uses only ring 0 (now 1) and 3.
Memory managers can be implemented in userspace without any problems. You only need 2 API calls in the kernel: one for granting pages and one for flushing them. If you're looking for something a bit more complex, you could add a third - for mapping pages from one process to another (shared pages, anyone?).MessiahAndrw wrote:About the only practical use I see for Ring 1-2 is in a microkernel if you wish to place memory management completely outside of the kernel.
I did, you just didn't understand my answer :).Love4Boobies wrote:You didn't understand what I was asking.
Still ring 1, most likely. Yes, that could theoretically trash the guest OS, but only rather theoretically. Besides, ring 1 is not used anyway by any main OS, so who cares?I got that guest ring 0 stuff goes at ring 1 on the physical machine. But if the guest OS also uses ring 1, where does that go? Ring 1 (that could trash the guest OS)
That's what's called a monolithic kernel. Your point?quanganht wrote:Drivers and service in Windows run in ring 0 to lower the switching overhead.
... but thats just not true...quanganht wrote:Drivers and service in Windows run in ring 0 to lower the switching overhead.
Well, since you brought it up, yeah, there are two types of drivers in windows: kernel-mode drivers and user-mode drivers. My guess is that kernel-mode drivers are here to stay for a while, unfortunately.JAAman wrote:in windows, most drivers run in ring3 not ring0...
AFAIK, all file system, fixed disk, and network drivers run in ring 0 for performance reasons. Plus, there is at least part of the video driver framework that runs in ring 0.JAAman wrote:MS does use a ring0 disk driver for accessing the swap file though, iirc
Perhaps saying that Windows has a microkernel design but built as a monolithic kernel is better then saying it has a "hybrid" kernel.Love4Boobies wrote:P.S: for anyone who's gonna start saying anything about hybrid kernels, that's BS IMO
That would be a true statement if you're talking about Mac OS X, but not so much about Windows. Other than the "sub-system servers" that allowed for different OS personalities, the original NT design was modeled after VMS, which is definitely not a microkernel.neon wrote:Perhaps saying that Windows has a microkernel design but built as a monolithic kernel is better then saying it has a "hybrid" kernel.Love4Boobies wrote:P.S: for anyone who's gonna start saying anything about hybrid kernels, that's BS IMO