Messages in this thread | | | Date | Sun, 23 May 2004 13:49:36 +0200 | Subject | Re: i486 emu in mainline? | From | Helge Hafting <> |
| |
On Sun, May 23, 2004 at 11:48:53AM +0200, Willy Tarreau wrote: > > You mean like when a user does a malloc() and the memory is not physically > allocated because not used yet ? or even in case memory has been swapped > out ? I believe I begin to understand, but the corner case is not really > clear to me. It yet seems strange to me that the user can reference memory > areas that the kernel cannot access.
The user referencing non-present memory is not a problem, because: 1. It is always pssoible to block the user process and let it wait (a long time) for swapping to happen. That might not be an option for the kernel - it can't wait while holding a spinlock, for example. 2. It is always ok to kill the user process if it uses memory it doesn't have. It is not ok to "kill" the kernel. The indirect ways of using user memory from the kernel side ensures that the normal mechanisms (swap-wait or kill) applies to the process owning the memory. Direct reference from kernel does not invoke normal page fault mechanisms when memory goes wrong.
Helge Hafting - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |