Re: [Qemu-devel] [PATCH] virtio-balloon: Tweak recent fix for integer overflow

2014-10-09 Thread Luiz Capitulino
On Wed, 1 Oct 2014 18:43:44 +0200 Markus Armbruster wrote: > Commit 1f9296b avoids "other kinds of overflow" by limiting the > polling interval to UINT_MAX. The computations to protect are done in > 64 bits. This is indeed safe when unsigned is 32 bits, as it commonly > is. It isn't when unsi

Re: [Qemu-devel] [PATCH] virtio-balloon: Tweak recent fix for integer overflow

2014-10-01 Thread Eric Blake
On 10/01/2014 10:43 AM, Markus Armbruster wrote: > Commit 1f9296b avoids "other kinds of overflow" by limiting the > polling interval to UINT_MAX. The computations to protect are done in > 64 bits. This is indeed safe when unsigned is 32 bits, as it commonly > is. It isn't when unsigned is 64 bi

[Qemu-devel] [PATCH] virtio-balloon: Tweak recent fix for integer overflow

2014-10-01 Thread Markus Armbruster
Commit 1f9296b avoids "other kinds of overflow" by limiting the polling interval to UINT_MAX. The computations to protect are done in 64 bits. This is indeed safe when unsigned is 32 bits, as it commonly is. It isn't when unsigned is 64 bits. Purely theoretical; I'm not aware of such a system.