WARNING - OLD ARCHIVES

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

xen-devel

Re: [Xen-devel] grant table interface addition?

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] grant table interface addition?
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 03 Nov 2008 13:28:48 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 03 Nov 2008 05:28:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C534A553.28AD7%keir.fraser@xxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <490EF8ED.76E4.0078.0@xxxxxxxxxx> <C534A553.28AD7%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 03.11.08 13:55 >>>
>On 3/11/08 12:13, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:
>
>> While looking in more detail into how all this fits together, I realized that
>> there appears to be a race condition in blktap: Since fast_flush_area()
>> and dispatch_rw_block_io() call create_lookup_pte_addr() without holding
>> mm->mmap_sem, there's nothing preventing the just verified (or
>> created) page table structures to go away again before
>> HYPERVISOR_grant_table_op() is able to finish (or even begin) its job.
>> Am I missing something here?
>
>So, for example, it could be munmap()ed under those functions' feet? Or the
>process could die? Looks like you could be right, although I've never looked
>closely at the blktap kernel driver.

Process death is probably not a concern, but munmap() of the region in
question or (potentially, maybe not in current kernels) even a nearby one
is.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>