Re: [PATCH v2 RFC] fix host-endianness bug and prevent overflow

2024-04-24 Thread Peter Maydell
On Wed, 24 Apr 2024 at 13:53, Alexandra Diupina wrote: > > Add a type cast and use extract64() instead of extract32() > to avoid integer overflow on addition. Fix bit fields > extraction according to documentation. > Also fix host-endianness bug by swapping desc fields from guest > memory order to

[PATCH v2 RFC] fix host-endianness bug and prevent overflow

2024-04-24 Thread Alexandra Diupina
Add a type cast and use extract64() instead of extract32() to avoid integer overflow on addition. Fix bit fields extraction according to documentation. Also fix host-endianness bug by swapping desc fields from guest memory order to host memory order after dma_memory_read(). Found by Linux Verifica