Subject: Re: port-mac68k/29179
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 02/09/2005 08:45:35
On Feb 9, 2005, at 6:25 AM, Izumi Tsutsui wrote:
> Hmm, I'm not a VM guy, but actually my news68k and hp300 don't
> have any problem for a month without these uvm_map_protect() calls,
> so I guess we can just remove them. (or should we ask Jason?)
Let me explain the scenario that caused me to add them in the first
place, and then you can decide if it's OK to remove them now :-)
There was a time where the space taken by kernel text/data/bss were
"reserved" in kernel_map. However, kernel text was read-only at the
MMU level, but there was only a single read/write kernel_map entry that
described the entire kernel.
This normally isn't a problem, UNLESS you have some buggy code that
erroneously scribbles over the kernel text. Then what would happen is
a write fault would occur, and since the kernel_map entry was a
read/write entry, the VM system proceeded to COW the pages, rather than
report the fault.
-- thorpej