From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Ropert Subject: Re: [RESEND] Question about recursive mappings Date: Wed, 24 May 2006 22:12:06 +0200 Message-ID: <4474BE16.8060407@adviseo.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 :-) > >Ian > > 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. Mathieu