On 8/7/2023 8:43 AM, Dan Carpenter wrote:
On Mon, Aug 07, 2023 at 05:09:34PM +0300, Dan Carpenter wrote:
The encode_dma() function has some validation on in_trans->size but it's
not complete and it would be more clear to move those checks to
find_and_map_user_pages().
The encode_dma() had two c
On Mon, Aug 07, 2023 at 05:09:34PM +0300, Dan Carpenter wrote:
> + remaining = in_trans->size - resources->xferred_dma_size;
> + total = in_trans->size + offset_in_page(xfer_start_addr);
> + if (total >= SIZE_MAX)
Btw, I wrote it >= instead of > to silence some idiotic static analysis.
On Mon, Aug 07, 2023 at 05:09:34PM +0300, Dan Carpenter wrote:
> The encode_dma() function has some validation on in_trans->size but it's
> not complete and it would be more clear to move those checks to
> find_and_map_user_pages().
>
> The encode_dma() had two checks:
>
> if (in_trans->add
The encode_dma() function has some validation on in_trans->size but it's
not complete and it would be more clear to move those checks to
find_and_map_user_pages().
The encode_dma() had two checks:
if (in_trans->addr + in_trans->size < in_trans->addr || !in_trans->size)
ret