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] Double mapping of iomem assertion

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Kieran Mansley" <kmansley@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Double mapping of iomem assertion
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 19 Oct 2007 08:13:33 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 19 Oct 2007 00:12:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C33D38B9.17127%Keir.Fraser@xxxxxxxxxxxx>
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: <C33D2EFA.1710B%Keir.Fraser@xxxxxxxxxxxx> <C33D38B9.17127%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> 18.10.07 17:22 >>>
>On 18/10/07 15:40, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx> wrote:
>
>> Vmalloc area pagetables are demand mapped into per-process pgdirs. So it's
>> invalid for vunmap_pte_range() to be relying solely on update_va_mapping().
>> Either it should use some other method, or at least have some other method
>> as a fallback.
>> 
>> This is easily fixed. I guess I'll audit other uses of update_va_mapping()
>> at the same time.
>
>Fixed by linux-2.6.18-xen.hg changeset 265. I'll also backport for 3.1
>series.
>
>This was introduced by xen changeset 14731, back in April. So Jan is to
>blame (and me, I suppose!). ;-) I expect it's in a few vendor kernels at
>this point...

Indeed, I didn't consider this situation. However, excluding the check
against current->mm here was on purpose (and hence I'm not certain
your adding of it was correct) - when used on user mappings,
ptep_get_and_clear() is expected to return the most up-to-date A/D
flags, which cannot be achieved through a hypercall. On the contrary,
the use(s) with init_mm never have such expectations as far as I
recall, they at best check the returned value for validity/presence/null.

Jan


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