lkml.org 
[lkml]   [2004]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: i486 emu in mainline?
From
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/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.041 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site