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]: xl: use libuuid to generate random UUID's

To: Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: xl: use libuuid to generate random UUID's
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 5 Aug 2010 11:34:20 +0100
Cc: Ian, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Gianni Tedesco \(3P\)" <gianni.tedesco@xxxxxxxxxx>
Delivery-date: Thu, 05 Aug 2010 03:34:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C5A8216.6030607@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: <1280944162.18490.219.camel@xxxxxxxxxxxxxxxxxxxxxx> <4FA716B1526C7C4DB0375C6DADBC4EA37AD0596B2F@xxxxxxxxxxxxxxxxxxxxxxxxx> <4C5A8216.6030607@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Thu, 5 Aug 2010, Vincent Hanquez wrote:
> On 05/08/10 03:19, Ian Pratt wrote:
> >> Link to libuuid in xl et al and bring in the header file. Use libuuid to
> >> generate UUID's which are actually UU and not merely pseudo-random :)
> >>
> >> As a side-effect I have also used libuuid to generate more random MAC
> >> addresses rather than keeping the old code and simply xoring getpid() in
> >> to the PRNG seed.
> >
> > The MAC generation scheme in xend was awful -- it might be a good idea to 
> > take this opportunity to fix things in libxl.
> >
> > The best approach is to generate locally administered MAC addresses hence 
> > giving us 46 bits of freedom rather than XenSource registered OUI addresses 
> > which have just 24 bits -- collisions will be *much* less likely. Further, 
> > it's best not to generate random addresses every time, but to derive the 
> > MAC address from a good hash of the VM UUID and the NIC number so that they 
> > are deterministic.
> 
> Adding some details here...
> 
> In general it would be a good idea to recopy already *existing* schemes 
> (unless it can be proven to be the wrong thing to do) already available 
> in XCP and XCI into libxl, instead of reinventing new square wheels like 
> here. (although this square wheel is in xl not in libxl actually)
> 
> The MAC generation, as the one Ian mentioned, is already available in 
> the XCI toolstack and in the XCP toolstack (the code there is a bit more 
> scattered so i'ld recommend reading the XCI one).
> 
 
since you seem to know exactly where the code is, would you like to
submit a patch for that? ;)

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

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