Re: [PATCH] RDMA/irdma: Prevent overflows in memory contiguity checks

From: Leon Romanovsky

Date: Sun Jul 05 2026 - 10:03:04 EST



On Wed, 24 Jun 2026 17:48:46 +0300, Aleksandrova Alyona wrote:
> irdma_check_mem_contiguous() and irdma_check_mr_contiguous() verify that
> PBL entries describe physically contiguous memory ranges.
>
> Both functions calculate byte offsets using 32-bit operands. For example,
> with 4 KiB pages, pg_size * pg_idx overflows 32-bit arithmetic when
> pg_idx reaches 1048576. In the level-2 check, PBLE_PER_PAGE is 512, so
> i * pg_size * PBLE_PER_PAGE overflows when i reaches 2048.
>
> [...]

Applied, thanks!

[1/1] RDMA/irdma: Prevent overflows in memory contiguity checks
https://git.kernel.org/rdma/rdma/c/3cda0dfe8c651d

Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>