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 5 of 9] xl: Add function to generate random uuid

Gianni Tedesco writes ("Re: [Xen-devel] [PATCH 5 of 9] xl: Add function to 
generate random uuid and use it"):
> Nothing wrong with the patch but draws my attention to the fact that
> this method seems far too likely to collide UUID's, for example in xl
> invocations started during the same second. Why not use system entropy
> pool? eg. scanf contents of /proc/sys/kernel/rand/uuid... I'm aware this
> ought to be portable but PRNG can always be a fallback.

Yes.

We should probably use /dev/urandom (on Linux, or I think /dev/random
on BSD).  If that's not available then we should use rand_r seeded
with time and pid.

Ian.

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

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