Re: [libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-31 Thread Eric Blake
On 08/31/2013 12:47 AM, Jason Helfman wrote: >>> >>> ACK whether you change the enum or not. >> >> Thanks; pushed after tweaking the comment to not trigger a false >> negative during 'make syntax-check'. >> >> -- >> Eric Blake eblake redhat com+1-919-301-3266 >> Libvirt virtualization library

Re: [libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-30 Thread Jason Helfman
On Fri, Aug 30, 2013 at 5:28 AM, Eric Blake wrote: > On 08/30/2013 03:36 AM, Daniel P. Berrange wrote: > > On Thu, Aug 29, 2013 at 05:19:21PM -0600, Eric Blake wrote: > >> FreeBSD 10 recently changed their definition of RAND_MAX, to try > >> and cover the fact that their evenly distributed result

Re: [libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-30 Thread Eric Blake
On 08/30/2013 03:36 AM, Daniel P. Berrange wrote: > On Thu, Aug 29, 2013 at 05:19:21PM -0600, Eric Blake wrote: >> FreeBSD 10 recently changed their definition of RAND_MAX, to try >> and cover the fact that their evenly distributed results really are >> a smaller range than a full power of 2. As a

Re: [libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-30 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 05:19:21PM -0600, Eric Blake wrote: > FreeBSD 10 recently changed their definition of RAND_MAX, to try > and cover the fact that their evenly distributed results really are > a smaller range than a full power of 2. As a result, I did some > investigation, and learned: > >

Re: [libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-29 Thread Eric Blake
On 08/29/2013 05:17 PM, Eric Blake wrote: > FreeBSD 10 recently changed their definition of RAND_MAX, to try > and cover the fact that their evenly distributed results really are > a smaller range than a full power of 2. As a result, I did some > investigation, and learned: Disregard this one; lo

[libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-29 Thread Eric Blake
FreeBSD 10 recently changed their definition of RAND_MAX, to try and cover the fact that their evenly distributed results really are a smaller range than a full power of 2. As a result, I did some investigation, and learned: 1. POSIX requires random() to be evenly distributed across exactly 31 bi

[libvirt] [PATCH] random: don't mix RAND_MAX with random_r

2013-08-29 Thread Eric Blake
FreeBSD 10 recently changed their definition of RAND_MAX, to try and cover the fact that their evenly distributed results really are a smaller range than a full power of 2. As a result, I did some investigation, and learned: 1. POSIX requires random() to be evenly distributed across exactly 31 bi