From: Leon Romanovsky <leon@kernel.org>
To: xuhaoyue1@hisilicon.com, Alexander.Chesnokov@kaspersky.com
Cc: David Laight <david.laight.linux@gmail.com>,
lvc-project@linuxtesting.org, Oleg.Kazakov@kaspersky.com,
Pavel.Zhigulin@kaspersky.com,
Wenpeng Liang <liangwenpeng@huawei.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Xi Wang <wangxi11@huawei.com>,
Weihang Li <liweihang@huawei.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] RDMA/hns: Compute HEM index in 64-bit in hns_roce_v2_set_hem()
Date: Sun, 12 Jul 2026 04:46:34 -0400 [thread overview]
Message-ID: <178384599488.1550388.5775639238568762415.b4-ty@kernel.org> (raw)
In-Reply-To: <20260709050327.3547237-1-Alexander.Chesnokov@kaspersky.com>
On Thu, 09 Jul 2026 08:03:27 +0300, Alexander.Chesnokov@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@kernel.org>
prev parent reply other threads:[~2026-07-12 8:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 5:03 [PATCH v3] RDMA/hns: Compute HEM index in 64-bit in hns_roce_v2_set_hem() Alexander.Chesnokov
2026-07-12 8:46 ` Leon Romanovsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178384599488.1550388.5775639238568762415.b4-ty@kernel.org \
--to=leon@kernel.org \
--cc=Alexander.Chesnokov@kaspersky.com \
--cc=Oleg.Kazakov@kaspersky.com \
--cc=Pavel.Zhigulin@kaspersky.com \
--cc=david.laight.linux@gmail.com \
--cc=jgg@ziepe.ca \
--cc=liangwenpeng@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=liweihang@huawei.com \
--cc=lvc-project@linuxtesting.org \
--cc=wangxi11@huawei.com \
--cc=xuhaoyue1@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox