xen-devel
Re: [Xen-devel] [PATCH 5 of 9] xl: Add function to generate random uuid
On Tue, 2010-07-27 at 17:02 +0100, Ian Jackson wrote:
> 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.
Or perhaps libuuid? It's is used by blktap2 so we already need it, at
least on Linux.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 8 of 9] xl: Factor out domain death handling into a separate function, (continued)
- [Xen-devel] [PATCH 8 of 9] xl: Factor out domain death handling into a separate function, Ian Campbell
- [Xen-devel] [PATCH 9 of 9] xl: support on_{poweroff, reboot, crash} domain configuration options, Ian Campbell
- [Xen-devel] [PATCH 0 of 9] xl: handle domain shutdown/reboot/crash in a user configurable way, Ian Campbell
- [Xen-devel] [PATCH 1 of 9] libxl: Add LIBXL_EVENT namespace to enum libxl_event_type, Ian Campbell
- [Xen-devel] [PATCH 2 of 9] libxl: add shutdown reason to libxl_dominfo, Ian Campbell
- [Xen-devel] [PATCH 3 of 9] libxl: return libxl_dominfo from libxl_event_get_domain_death_info, Ian Campbell
- [Xen-devel] [PATCH 4 of 9] libxl: signal caller if domain already destroyed on domain death event, Ian Campbell
- [Xen-devel] [PATCH 5 of 9] xl: Add function to generate random uuid and use it, Ian Campbell
- [Xen-devel] [PATCH 6 of 9] xl: Factor out domain death handling into a separate function, Ian Campbell
- [Xen-devel] [PATCH 7 of 9] xl: support on_{poweroff, reboot, crash} domain configuration options, Ian Campbell
- [Xen-devel] [PATCH 8 of 9] libxl: add libxl_domain_preserve, Ian Campbell
- [Xen-devel] [PATCH 9 of 9] xl: implement "rename-restart" action for shutdown, Ian Campbell
|
|
|