From: Keir Fraser Subject: Re: xsd_kva mmap Date: Mon, 6 Mar 2006 18:53:10 +0000 Message-ID: <2510641adc7c67a4d0d20a0224b0ece5@cl.cam.ac.uk> References: <20060306183023.GA7814@sorel.sous-sol.org> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060306183023.GA7814@sorel.sous-sol.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Chris Wright Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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). -- Keir