[lvc-project] [PATCH v3] RDMA/hns: Compute HEM index in 64-bit in hns_roce_v2_set_hem()
Leon Romanovsky
leon at kernel.org
Sun Jul 12 11:46:34 MSK 2026
On Thu, 09 Jul 2026 08:03:27 +0300, Alexander.Chesnokov at kaspersky.com wrote:
> In hns_roce_v2_set_hem() the HEM address indices are computed from
> i, j and k (the base-chunk_ba_num decomposition of the 32-bit
> table_idx) in 32-bit arithmetic and then assigned to u64 fields.
> The recombined value always equals table_idx and cannot exceed
> U32_MAX, so this is not a reachable overflow and has no user-visible
> impact. Declare i, j and k as u64 so the calculation is done in
> 64-bit and the pattern no longer trips static analyzers.
>
> [...]
Applied, thanks!
[1/1] RDMA/hns: Compute HEM index in 64-bit in hns_roce_v2_set_hem()
https://git.kernel.org/rdma/rdma/c/923e1cb4e525bb
Best regards,
--
Leon Romanovsky <leon at kernel.org>
More information about the lvc-project
mailing list