RE: [PATCH v2] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-29 Thread Tuguoyi
On 29.10.2019 19:57 Vladimir Sementsov-Ogievskiy wrote: > 29.10.2019 14:14, Max Reitz wrote: > > On 28.10.19 07:33, Tuguoyi wrote: > >> In check_constraints_on_bitmap(), the sanity check on the granularity > >> will cause uint64_t integer left-shift overflow when cluster_size is > >> 2M and the gra

Re: [PATCH v2] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-29 Thread Vladimir Sementsov-Ogievskiy
29.10.2019 14:14, Max Reitz wrote: > On 28.10.19 07:33, Tuguoyi wrote: >> In check_constraints_on_bitmap(), the sanity check on the >> granularity will cause uint64_t integer left-shift overflow >> when cluster_size is 2M and the granularity is BIGGER than >> 32K. As a result, for a qcow2 disk with

Re: [PATCH v2] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-29 Thread Max Reitz
On 28.10.19 07:33, Tuguoyi wrote: > In check_constraints_on_bitmap(), the sanity check on the > granularity will cause uint64_t integer left-shift overflow > when cluster_size is 2M and the granularity is BIGGER than > 32K. As a result, for a qcow2 disk with cluster_size set to > 2M, we could not e

Re: [PATCH v2] qcow2-bitmap: Fix uint64_t left-shift overflow

2019-10-28 Thread Vladimir Sementsov-Ogievskiy
28.10.2019 9:33, Tuguoyi wrote: > In check_constraints_on_bitmap(), the sanity check on the > granularity will cause uint64_t integer left-shift overflow > when cluster_size is 2M and the granularity is BIGGER than > 32K. As a result, for a qcow2 disk with cluster_size set to > 2M, we could not eve