[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] xen_disk: convert discard input to byte ranges
From: |
Olaf Hering |
Subject: |
Re: [Qemu-devel] [PATCH] xen_disk: convert discard input to byte ranges |
Date: |
Tue, 22 Nov 2016 17:12:35 +0100 |
User-agent: |
Mutt/1.6.2 (6759) |
On Fri, Nov 18, Eric Blake wrote:
> if (sec_start > (INT64_MAX >> BDRV_SECTOR_BITS) - sec_count)
I have looked at this for a while now and cant spot how this would cover
all cases. Are you saying there should be just a single overflow check,
yours? My change has two: one to check for wrap around and to check
against the upper limit. My check happens to work with 0/UINT64_MAX or
INT64_MAX/INT64_MAX as input, yours appearently not.
Obviously I'm missing something essential.
Olaf
signature.asc
Description: PGP signature