Re: [PATCH] accel/qaic: Clean up integer overflow checking in map_user_pages()

2023-08-15 Thread Jeffrey Hugo
On 8/10/2023 6:23 AM, Dan Carpenter wrote: The encode_dma() function has some validation on in_trans->size but 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->si

Re: [PATCH] accel/qaic: Clean up integer overflow checking in map_user_pages()

2023-08-11 Thread Carl Vanderlip
On 8/10/2023 5:23 AM, Dan Carpenter wrote: The encode_dma() function has some validation on in_trans->size but 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->si

Re: [PATCH] accel/qaic: Clean up integer overflow checking in map_user_pages()

2023-08-10 Thread Jeffrey Hugo
On 8/10/2023 6:23 AM, Dan Carpenter wrote: The encode_dma() function has some validation on in_trans->size but 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->si

[PATCH] accel/qaic: Clean up integer overflow checking in map_user_pages()

2023-08-10 Thread Dan Carpenter
The encode_dma() function has some validation on in_trans->size but 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) return -EINVAL; The in_t