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/
Home Products Support Community News


RE: [Xen-devel] [RESEND] Question about recursive mappings

To: "Mathieu Ropert" <mro@xxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [RESEND] Question about recursive mappings
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 24 May 2006 10:34:53 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 24 May 2006 02:35:14 -0700
Envelope-to: www-data@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcZ/EE9kYyNQbfRkRnGG4kQxi+o1bQAA7/Zg
Thread-topic: [Xen-devel] [RESEND] Question about recursive mappings
> About the possible fix, won't something like trying a
> get_linear_pagetable() at all level works? Will it cause too 
> much overhead?
> Generally speaking, is allowing a R/O mapping of another 
> table the domain own (whichever level it is) safe? At first 
> thought, i don't see any way of exploiting it.

Yes, it's safe, you just need to get the 'general' ref count right,
which as I recall, depends on whether the page you're mapping is in the
same page table, or a foreign page table. The va back pointer means that
there is a unique 'normal' place in each pagetable where a given page
can be mapped, so you can easily inspect (via xen's linear mapping) to
see whether the page belongs to the current pagetable or not.

One thing we do have to watch out for is when we introduce super page
mappings, as you have to be careful about using linear page tables in
this context -- the x86 pagetable format doesn't allow you to generate a
trap if a linear mapping attempts to misuse a superpage. That's not your
worry right now :-) 


Xen-devel mailing list