Well, I think it applies to all architectures, but I'm not sure, so take with care. Also, I think this is something everybody knows, sorry. The OS is mapped in every process address space, but its pages are protected (check out this http://www.logix.cz/michal/doc/i386/chp05-02.htm#F-05-10). A process cannot jump to a kernel address, because the process executes in user mode and kernel addresses are therefore protected from being executed by a user process. Then, a system call occurs and the kernel starts executing through an interrupt (the famous 0x80 vector number). The active address space is the caller one, but now, since the kernel executes in privileged, any address of any page can be reached. The kernel can throw to the bus addresses from user space, cause it is actually using the process address space. I was confused mostly because I thought the kernel as a process, and I didn't remember how a page table entry looks like. Besides, I have learnt something: during an interrupt from an external device for example, the kernel cannot use addresses from any user process memory map, because the current address space may not be the correct one. Thank you, and sorry for my English On Oct 7, 2010, at 6:38 PM, hiren panchasara wrote:
|