Re: [Qemu-devel] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-25 Thread Stefan Hajnoczi
On Wed, May 23, 2018 at 11:04:28AM +0800, Fam Zheng wrote: > We don't verify the request range against s->size in the I/O callbacks > except for raw_co_pwritev. This is wrong (especially for > raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. > > Signed-off-by: Fam Zheng > --- > block/raw-

Re: [Qemu-devel] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-24 Thread Fam Zheng
On Wed, 05/23 13:28, Eric Blake wrote: > On 05/22/2018 10:04 PM, Fam Zheng wrote: > > We don't verify the request range against s->size in the I/O callbacks > > except for raw_co_pwritev. This is wrong (especially for > > raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. > > I'd also mention

Re: [Qemu-devel] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-23 Thread Eric Blake
On 05/22/2018 10:04 PM, Fam Zheng wrote: We don't verify the request range against s->size in the I/O callbacks except for raw_co_pwritev. This is wrong (especially for raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. I'd also mention ... Signed-off-by: Fam Zheng --- block/raw-form

[Qemu-devel] [PATCH v5 02/10] raw: Check byte range uniformly

2018-05-22 Thread Fam Zheng
We don't verify the request range against s->size in the I/O callbacks except for raw_co_pwritev. This is wrong (especially for raw_co_pwrite_zeroes and raw_co_pdiscard), so fix them. Signed-off-by: Fam Zheng --- block/raw-format.c | 64 +- 1 f