WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: Interaction between Xen and XFS: stray RW mappings

To: Andi Kleen <andi@xxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: Interaction between Xen and XFS: stray RW mappings
From: Zachary Amsden <zach@xxxxxxxxxx>
Date: Mon, 22 Oct 2007 17:16:03 -0700
Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, David Chinner <dgc@xxxxxxx>, dean gaudet <dean@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Bøgeskov <xen-users@xxxxxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, xfs-masters@xxxxxxxxxxx, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Morten@xxxxxxx, Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Delivery-date: Tue, 23 Oct 2007 11:01:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20071022233514.GA9057@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <470FA7C3.90404@xxxxxxxx> <20071014225618.GN23367404@xxxxxxx> <4712A254.4090604@xxxxxxxx> <200710151415.07248.nickpiggin@xxxxxxxxxxxx> <alpine.DEB.0.9999.0710212015430.2320@xxxxxxxxxxxxxxxxxxx> <471C1A61.1010001@xxxxxxxx> <p73sl439s7k.fsf@xxxxxxxxxxxxxx> <471CEEB4.9040807@xxxxxxxx> <20071022190740.GA1695@xxxxxxxxxxxxxxxxxx> <20071022223224.GC995458@xxxxxxx> <20071022233514.GA9057@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2007-10-23 at 01:35 +0200, Andi Kleen wrote:
> On Tue, Oct 23, 2007 at 08:32:25AM +1000, David Chinner wrote:
> > On Mon, Oct 22, 2007 at 09:07:40PM +0200, Andi Kleen wrote:
> > > On Mon, Oct 22, 2007 at 11:40:52AM -0700, Jeremy Fitzhardinge wrote:
> > > > Andi Kleen wrote:
> > > > > Jeremy Fitzhardinge <jeremy@xxxxxxxx> writes:
> > > > >   
> > > > >> Yes, that's precisely the problem.  xfs does delay the unmap, leaving
> > > > >> stray mappings, which upsets Xen.
> > > > >>     
> > > > >
> > > > > Again it not just upsets Xen, keeping mappings to freed pages is 
> > > > > wrong generally 
> > > > > and violates the x86 (and likely others like PPC) architecture 
> > > > > because it can 
> > > > > cause illegal caching attribute aliases.

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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>