From: Chris Wright Subject: Re: xsd_kva mmap Date: Mon, 6 Mar 2006 11:11:50 -0800 Message-ID: <20060306191150.GV3883@sorel.sous-sol.org> References: <20060306183023.GA7814@sorel.sous-sol.org> <2510641adc7c67a4d0d20a0224b0ece5@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <2510641adc7c67a4d0d20a0224b0ece5@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Chris Wright , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org * Keir Fraser (Keir.Fraser@cl.cam.ac.uk) wrote: > > On 6 Mar 2006, at 18:30, Chris Wright wrote: > > >I did an almost identical patch to yours for xsd_kva mmap. You'll find > >it below. I just saw the conflict when updating, and think that we > >may want to merge approaches. Main difference is in populating the > >ops, and making xsd_kva rdwr. The first is just cleanup, the second I > >don't believe is functional in your version. Can't open rdwr and mmap > >PROT_READ|PROT_WRITE and 0400 file. Also, I just drop the read > >interface > >entirely, as it's no longer needed. I'll follow this up with the > >actual > >diff between the two. > > Also, your patch would need to set vma->vm_pgoff before calling > remap_pfn_range(), or the unmap code will incorrectly mess with page > reference counts (because the skanky VM_PFNMAP check in vm_normal_page > would not trigger and so that function will return non-NULL). Thanks for the eyes, esp. considering that's what the original fix was all about ;-) thanks, -chris