Hi, I have more questions about the internals of gnumach (oskit-mach to
be more precise). I have either not been able to find answers to them, or
it's very difficult to deduce them from the sourcecode.

1. Where, if anywhere, does gnumach change into virtual 8086 mode? If it does
then what purpose does it serv? If it doesn't and and if only the kernel
code has high enough privelege level to change to vm86 mode, why is it
even mentioned in the code (in a few placed deep in i386/i386/)?

2. I've noticed that the `copyin' routine (defined in i386/i386/locore.S)
does no checking as to whether it's accessing valid memory from user space.
Where is the user space address checked for validity before invoking `copyin'?
If it's not in principly a user can generate a page fault by supplying an
invalid pointer which ends up as an argument for this routine.

3. And what *does* happen if there is a page fault from kernel space while
accessing user space memory? `kernel_trap()' in i386/i386/trap.c seems
rather pessimistic and panics a lot. If the user supplied an invalid address
would it not be appropriate to raise an access violation exception?

Thanks in advance.

Igor

Reply via email to