Re: [PATCH v2] block: Fix pad_request's request restriction

2023-07-17 Thread Stefan Hajnoczi
On Fri, Jul 14, 2023 at 10:59:38AM +0200, Hanna Czenczek wrote: > bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, > which bdrv_check_qiov_request() does not guarantee. > > bdrv_check_request32() however will guarantee this, and both of > bdrv_pad_request()'s callers

[PATCH v2] block: Fix pad_request's request restriction

2023-07-14 Thread Hanna Czenczek
bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, which bdrv_check_qiov_request() does not guarantee. bdrv_check_request32() however will guarantee this, and both of bdrv_pad_request()'s callers (bdrv_co_preadv_part() and bdrv_co_pwritev_part()) already run it before calling