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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Blake <eblake@xxxxxxxxxx> [2018-08-01, 09:51AM -0500]:
> On 08/01/2018 07:57 AM, Bjoern Walk wrote:
> > And here's the fix for the viriscsitest on big-endian machine like
> > Daniel suggested.
> 
> >  From d59b254294a90c5a9ca0fb6ad29465cd0950bb61 Mon Sep 17 00:00:00 2001
> > From: Bjoern Walk<bwalk@xxxxxxxxxxxxx>
> > Date: Wed, 1 Aug 2018 14:48:47 +0200
> > Subject: [PATCH] util: virrandom: make virRandomBits endian-safe
> > 
> > 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é<berrange@xxxxxxxxxx>
> > Signed-off-by: Bjoern Walk<bwalk@xxxxxxxxxxxxx>
> > ---
> >   src/util/virrandom.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> 
> > -    ret &= (1ULL << nbits) - 1;
> > -    return ret;
> > +    return virReadBufInt64LE(ret) & ((1ULL << nbits) - 1);
> 
> Needs to be rebased on top of the fix that (1ULL << 64) is not defined.

Yes, agreed. But now the original patch has been pushed...

-- 
IBM Systems
Linux on Z & Virtualization Development
------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Schönaicher Str. 220, 71032 Böblingen
Phone: +49 7031 16 1819
------------------------------------------------------------------------
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294 

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux