Re: [Qemu-devel] [PATCH v2 6/7] throttle: Make burst_length 64bit and add range checks

2017-08-29 Thread Eric Blake
On 08/24/2017 08:24 AM, Alberto Garcia wrote: > LeakyBucket.burst_length is defined as an unsigned integer but the > code never checks for overflows and it only makes sure that the value > is not 0. > > In practice this means that the user can set something like > throttling.iops-total-max-length=

[Qemu-devel] [PATCH v2 6/7] throttle: Make burst_length 64bit and add range checks

2017-08-24 Thread Alberto Garcia
LeakyBucket.burst_length is defined as an unsigned integer but the code never checks for overflows and it only makes sure that the value is not 0. In practice this means that the user can set something like throttling.iops-total-max-length=4294967300 despite being larger than UINT_MAX and the fina