Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-05 Thread Daniel P . Berrangé
On Thu, Aug 02, 2018 at 01:12:02PM +0200, Pino Toscano wrote: > On Thursday, 2 August 2018 12:28:45 CEST Daniel P. Berrangé wrote: > > On Thu, Aug 02, 2018 at 10:17:32AM +0200, Bjoern Walk wrote: > > > Pino Toscano [2018-08-02, 10:02AM +0200]: > > > > I do not think this patch is correct: we are

Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-05 Thread Daniel P . Berrangé
On Thu, Aug 02, 2018 at 10:17:32AM +0200, Bjoern Walk wrote: > Pino Toscano [2018-08-02, 10:02AM +0200]: > > I do not think this patch is correct: we are dealing with random bytes, > > so there is no "endianness" for them. > > Well, it's not incorrect either, isn't it? I agree that endianness >

Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-05 Thread Pino Toscano
On Thursday, 2 August 2018 09:56:49 CEST Bjoern Walk wrote: > Make the generation of random bits in virRandomBits independent of the > endianness of the running architecture. > > This also solves problems with the mocked random byte generation on > big-endian machines. > > Suggested-by: Daniel

Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-02 Thread Pino Toscano
On Thursday, 2 August 2018 12:28:45 CEST Daniel P. Berrangé wrote: > On Thu, Aug 02, 2018 at 10:17:32AM +0200, Bjoern Walk wrote: > > Pino Toscano [2018-08-02, 10:02AM +0200]: > > > I do not think this patch is correct: we are dealing with random bytes, > > > so there is no "endianness" for them.

Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-02 Thread Bjoern Walk
Pino Toscano [2018-08-02, 10:02AM +0200]: > I do not think this patch is correct: we are dealing with random bytes, > so there is no "endianness" for them. Well, it's not incorrect either, isn't it? I agree that endianness doesn't matter for random data, but in the same time, it doesn't hurt to

[libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-02 Thread Bjoern Walk
Make the generation of random bits in virRandomBits independent of the endianness of the running architecture. This also solves problems with the mocked random byte generation on big-endian machines. Suggested-by: Daniel P. Berrangé Signed-off-by: Bjoern Walk --- This goes on top of Michal's