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

2023-07-12 Thread Stefan Hajnoczi
On Wed, 12 Jul 2023 at 10:51, Hanna Czenczek wrote: > > On 12.07.23 16:15, Stefan Hajnoczi wrote: > > On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: > >> On 11.07.23 22:23, Stefan Hajnoczi wrote: > >>> On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: > bdrv_pad

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

2023-07-12 Thread Peter Maydell
On Wed, 12 Jul 2023 at 15:50, Hanna Czenczek wrote: > There was and is no fix for the Coverity warning. I have mentioned that > warning because the question as to why the code uses > bdrv_check_qiov_request() came in the context of discussing it > (https://lists.nongnu.org/archive/html/qemu-devel

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

2023-07-12 Thread Hanna Czenczek
On 12.07.23 16:15, Stefan Hajnoczi wrote: On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: On 11.07.23 22:23, Stefan Hajnoczi wrote: On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, which bdrv_

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

2023-07-12 Thread Stefan Hajnoczi
On Wed, Jul 12, 2023 at 09:41:05AM +0200, Hanna Czenczek wrote: > On 11.07.23 22:23, Stefan Hajnoczi wrote: > > On Fri, Jun 09, 2023 at 10:33:16AM +0200, Hanna Czenczek wrote: > > > bdrv_pad_request() relies on requests' lengths not to exceed SIZE_MAX, > > > which bdrv_check_qiov_request() does not

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

2023-07-12 Thread Hanna Czenczek
On 11.07.23 22:23, Stefan Hajnoczi wrote: On Fri, Jun 09, 2023 at 10:33:16AM +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 bd

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

2023-07-11 Thread Stefan Hajnoczi
On Fri, Jun 09, 2023 at 10:33:16AM +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 (bdrv_co

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

2023-07-10 Thread Hanna Czenczek
On 09.06.23 10:33, 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 (bdrv_co_preadv_part() and bdrv_co_pwri

[PATCH] block: Fix pad_request's request restriction

2023-06-09 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 b