Re: [PATCH v3 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t

2020-01-20 Thread Eric Blake
On 1/20/20 6:28 AM, Vladimir Sementsov-Ogievskiy wrote: As far as I can see, NBD just passes NBDRequest.from (which is a uint64_t) to this function (on NBD_CMD_BLOCK_STATUS). Would this allow a malicious client to send a value > INT64_MAX, thus provoking an overflow and killing the server with

Re: [PATCH v3 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t

2020-01-20 Thread Max Reitz
On 20.01.20 13:28, Vladimir Sementsov-Ogievskiy wrote: > 20.01.2020 14:59, Max Reitz wrote: >> On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: >>> We are going to introduce bdrv_dirty_bitmap_next_dirty so that same >>> variable may be used to store its return value and to be its parameter,

Re: [PATCH v3 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
20.01.2020 14:59, Max Reitz wrote: > On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: >> We are going to introduce bdrv_dirty_bitmap_next_dirty so that same >> variable may be used to store its return value and to be its parameter, >> so it would int64_t. >> >> Similarly, we are going to

Re: [PATCH v3 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t

2020-01-20 Thread Max Reitz
On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: > We are going to introduce bdrv_dirty_bitmap_next_dirty so that same > variable may be used to store its return value and to be its parameter, > so it would int64_t. > > Similarly, we are going to refactor hbitmap_next_dirty_area to use >

[PATCH v3 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t

2019-12-19 Thread Vladimir Sementsov-Ogievskiy
We are going to introduce bdrv_dirty_bitmap_next_dirty so that same variable may be used to store its return value and to be its parameter, so it would int64_t. Similarly, we are going to refactor hbitmap_next_dirty_area to use hbitmap_next_dirty together with hbitmap_next_zero, therefore we want