On Tue, 2007-10-23 at 01:35 +0200, Andi Kleen wrote:
It is a serious offense to leave stray mappings for memory which can get
re-mapped to I/O devices... especially with PCI and other device
hotplug. I have to back up Andi on this one unconditionally.
On architectures where you have multibyte, non-wordsize updates to
hardware page tables, you even have races here when setting, updating
and clearing PTEs that must be done in a sequence where no aliasing of
mappings to partially written PTEs can result in I/O memory getting
mapped in a cacheable state. The window here is only one instruction,
and yes, it is possible for a window this small to create a problem. A
large (or permanently lazy) window is extremely frightening.
These things do cause bugs. The bugs take a very long time to show up
and are very difficult to track down, since they can basically cause
random behavior, such as hanging the machine or losing orbit and
crashing into the moon.
Zach
-