[libvirt] [PATCH for v4.6.0 0/2] Fix some random problems

Bjoern Walk bwalk at linux.ibm.com
Wed Aug 1 13:27:09 UTC 2018


Pino Toscano <ptoscano at redhat.com> [2018-08-01, 03:21PM +0200]:
> Hi Bjoern,
> 
> On Wednesday, 1 August 2018 14:57:07 CEST Bjoern Walk wrote:
> > And here's the fix for the viriscsitest on big-endian machine like
> > Daniel suggested.
> 
> I sent an alternative fix, only for viriscsitest, while you sent this
> patch.
> 
> IMHO virRandomBits() ought to not deal with endianness, since all it
> sees are random values, without any meaning.  The problem was specific
> to the test, because it assumed a certain order of the data returned by
> the mocked virRandomBytes().

Yes, I agree. That's why I hesitated sending this fix. But this was also
the solution that Daniel suggested and maybe there is value in having
the random bit generation endian-safe as well (although I don't see one
currently...).

I actually don't care how we fix it. I will test your patch and report
back.

> 
> -- 
> Pino Toscano


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 902 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180801/c764db6b/attachment-0001.sig>


More information about the libvir-list mailing list