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


Re: [Xen-devel] [PATCH REPOST] pv-grub: Fix for incorrect dom->p2m_host[

To: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH REPOST] pv-grub: Fix for incorrect dom->p2m_host[] list initialization
From: Daniel Kiper <dkiper@xxxxxxxxxxxx>
Date: Tue, 26 Apr 2011 16:25:35 +0200
Cc: linux-kernel@xxxxxxxxxxxxxxx, stefano.stabellini@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Daniel Kiper <dkiper@xxxxxxxxxxxx>, konrad.wilk@xxxxxxxxxx
Delivery-date: Tue, 26 Apr 2011 07:29:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110422223331.GB5124@xxxxxxxxxxxxxxxxxxxxxxxxx>
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: <20110422212545.GA22846@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110422223331.GB5124@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.3.28i
On Sat, Apr 23, 2011 at 12:33:32AM +0200, Samuel Thibault wrote:
> Hello,
> Daniel Kiper, le Fri 22 Apr 2011 23:25:45 +0200, a ?crit :
> > If pfn of newly allocated page is less than currently requested pfn
> > then relevant earlier allocated mfn is overwritten which leads to
> > domain crash later.
> Oops, good catch! And unfortunately it happens seldomly... I guess it
> may be the culprit for a fair number of other issues.

I discovered that issue on domU i386. It does not affect x86_64
in my environment. However, as you stated above that issue in some
circumstances could lead to mysterious system crashes or data

> > +   if (new_pfn < i)
> > +           for (new_pfn = i; new_pfn < dom->total_pages; ++new_pfn)
> > +                   if (dom->p2m_host[new_pfn] == new_mfn)
> > +                           break;
> Instead of looking for the page, which takes a linear time for each page
> and thus potentially quadratic time, we should probably rather record
> which PFN the MFNs < allocated have been moved to?

I am going to post new time optimized version
of that patch today or tommorow.


Xen-devel mailing list