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: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RESEND] Question about recursive mappings
From: Mathieu Ropert <mro@xxxxxxxxxx>
Date: Wed, 24 May 2006 22:12:06 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 25 May 2006 09:29:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D4BA818@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <A95E2296287EAD4EB592B5DEEFCE0E9D4BA818@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
Ian Pratt wrote:

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 :-)
Ok, i've done a little patch which seems to resolve the issue on my test setup. Basically, i've modified get_linear_pagetable(), added a level parameter and call it for each level but level 1. I need to do a little more test before i post the patch. As tomorrow is a national day, it should be ready friday.


Xen-devel mailing list