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] [PATCH] x86: add an extra check when validating a huge p

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: add an extra check when validating a huge pv L2 entry
From: Michael J Coss <mjcoss@xxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Sep 2009 12:15:42 -0400
Delivery-date: Wed, 09 Sep 2009 09:16:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AA7EB3902000078000142CB@xxxxxxxxxxxxxxxxxx>
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: <4AA7E3A90200007800014295@xxxxxxxxxxxxxxxxxx> <C6CD89E9.A636%keir.fraser@xxxxxxxxxxxxx> <4AA7EB3902000078000142CB@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
Jan Beulich wrote:
Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 09.09.09 17:35 >>>
On 09/09/2009 16:19, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

-            rc = get_data_page(mfn_to_page(m), d, writeable);
+            if ( mfn_valid(m) )
+                rc = get_data_page(mfn_to_page(m), d, writeable);
+            else
+                rc = -EINVAL;
'else rc = 0' would be more like it, eh?

Oh, yes - I got confused (again) by the inconsistencies in what return
values mean for the various functions.

Jan
I don't think that that's correct. The else clause is for the mfn_valid(m) failure case, and it seems appropriate to set the rc to some non-zero value.

---Michael J Coss

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