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] trouble with the new mmap-batch interface

To: Jan Beulich <JBeulich@xxxxxxxxxx>, Brendan Cully <brendan@xxxxxxxxx>
Subject: Re: [Xen-devel] trouble with the new mmap-batch interface
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 21 Jan 2010 08:57:06 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 21 Jan 2010 00:57:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B5820A4020000780002B30A@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqadSW4i/ovVqjASTKlqb0O3y8+XgAAo8rY
Thread-topic: [Xen-devel] trouble with the new mmap-batch interface
User-agent: Microsoft-Entourage/12.23.0.091001
On 21/01/2010 08:38, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>> Jan: Is it in fact a bug, because IOCTL_PRIVCMD_MMAPBATCH is similarly
>> structured (but legitimately, in that case)?
> 
> Generally I intended the caller to zero the array. If that's not a good
> idea, I can certainly put together patches (linux and libxc) that remove
> that assumption.

Well I think it's a bad idea. I can't imagine the saved copy_to_user() is
significantly expensive, and it makes the interface a bit confusing but in a
way that sometimes still works and then sometimes fails. So please make some
patches.

> If you'd like to leave the assumption in, then c/s 20822
> (fixing domain save) will also need another adjustment (using realloc()
> inside the loop doesn't seem very nice anyway - allocating the array
> where the other two arrays get allocated would be more consistent).

You can make this consistent in a separate patch, if you like.

 -- Keir



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