From: Jason Gunthorpe <jgg@ziepe.ca>
To: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org,
andrew.gospodarek@broadcom.com, selvin.xavier@broadcom.com,
kalesh-anakkur.purayil@broadcom.com
Subject: Re: [PATCH rdma-next v4 0/7] RDMA/bnxt_re: Support QP uapi extensions
Date: Tue, 12 May 2026 13:53:33 -0300 [thread overview]
Message-ID: <20260512165333.GG7702@ziepe.ca> (raw)
In-Reply-To: <20260508085858.21060-1-sriharsha.basavapatna@broadcom.com>
On Fri, May 08, 2026 at 02:28:51PM +0530, Sriharsha Basavapatna wrote:
> Sriharsha Basavapatna (7):
> RDMA/bnxt_re: Refactor bnxt_re_init_user_qp()
> RDMA/bnxt_re: Update rq depth for app allocated QPs
> RDMA/bnxt_re: Update sq depth for app allocated QPs
> RDMA/bnxt_re: Update msn table size for app allocated QPs
> RDMA/bnxt_re: Update hwq depth for app allocated QPs
> RDMA/bnxt_re: Support doorbells for app allocated QPs
> RDMA/bnxt_re: Enable app allocated QPs
There are alot of scary sashiko warnings, I stopped at this one:
https://sashiko.dev/#/patchset/20260508085858.21060-1-sriharsha.basavapatna%40broadcom.com
If userspace passes 0 or 1 for req->sq_npsn, qplib_qp->msn_tbl_sz will
evaluate to 0.
When this QP is used, userspace could trigger the kernel's send path via
ib_uverbs_post_send(), which calls bnxt_re_post_send() and ultimately
bnxt_qplib_post_send().
In bnxt_qplib_fill_msn_search(), there is a modulo calculation:
qp->msn %= qp->msn_tbl_sz;
Could this unvalidated req->sq_npsn lead to a divide-by-zero kernel panic?
Please go through them all. Fix the things newly added in this series,
especially the uapi issues like the above
It points out a bunch of pre-existing warnings too, please prepare a
seperate series to fix them, it can go after this one.
In future please be proactive to check sahsiko.dev don't wait for us
to look on it.
Jason
prev parent reply other threads:[~2026-05-12 16:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 8:58 [PATCH rdma-next v4 0/7] RDMA/bnxt_re: Support QP uapi extensions Sriharsha Basavapatna
2026-05-08 8:58 ` [PATCH rdma-next v4 1/7] RDMA/bnxt_re: Refactor bnxt_re_init_user_qp() Sriharsha Basavapatna
2026-05-08 8:58 ` [PATCH rdma-next v4 2/7] RDMA/bnxt_re: Update rq depth for app allocated QPs Sriharsha Basavapatna
2026-05-08 8:58 ` [PATCH rdma-next v4 3/7] RDMA/bnxt_re: Update sq " Sriharsha Basavapatna
2026-05-08 8:58 ` [PATCH rdma-next v4 4/7] RDMA/bnxt_re: Update msn table size " Sriharsha Basavapatna
2026-05-08 8:58 ` [PATCH rdma-next v4 5/7] RDMA/bnxt_re: Update hwq depth " Sriharsha Basavapatna
2026-05-08 8:58 ` [PATCH rdma-next v4 6/7] RDMA/bnxt_re: Support doorbells " Sriharsha Basavapatna
2026-05-08 8:58 ` [PATCH rdma-next v4 7/7] RDMA/bnxt_re: Enable " Sriharsha Basavapatna
2026-05-12 16:53 ` Jason Gunthorpe [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=20260512165333.GG7702@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=andrew.gospodarek@broadcom.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.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