From: Jacek <xo...@o2...> - 2004-12-14 17:22:31
|
Hello, I'm writing here for the firs time. Sorry in advance if I'll make any mistakes with my english. Please ignore them or you can tell me about them, I would be grateful :) I've been thinking about disallowing applications to make input/output operations on processor's ports. I've been looking at the kernel code and here is what I noticed, please tell me if I'm right: 1. all kernel and application code currently runs on privilege level 0 2. syscalls are called via int 0x80 3. there are different addres spaces for kernel and user code (different segment selectors) 4. appserver is also user program 5. appserver's drivers also run as user code and perform direct port operations The easiest way would be to dissallow all user applications making IO operations by changing their privilege level to ie 3 and setting the processor's IOPL in EFLAGS to ie 1. There is a problem if appservers uses direct IO operations. If so either the appsever could run on different IOPL or (better I think) the I/O Permission Bit Map could be used. There could be even only one bit map for the appserver and all his drivers. For now it could allow opperations on all ports. Later there could be implemented some functions that would allow registering port ranges that driver wants to use, etc. What do you think about all this? Regards Jacek Kutzmann PS: If there are any technical documents about Syllable kernel I'd also be glad if someone told me about them. |