From: Jason Gunthorpe <jgg@nvidia.com>
To: Jacob Moroni <jmoroni@google.com>
Cc: tatyana.e.nikolova@intel.com, leon@kernel.org,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/irdma: Initialize iwmr->access during MR registration
Date: Fri, 5 Jun 2026 14:14:05 -0300 [thread overview]
Message-ID: <20260605171405.GB2771195@nvidia.com> (raw)
In-Reply-To: <20260604154104.4035581-1-jmoroni@google.com>
On Thu, Jun 04, 2026 at 03:41:04PM +0000, Jacob Moroni wrote:
> Initialize iwmr->access during initial user mem registration so
> that it contains a valid value during a subsequent rereg_mr.
>
> Otherwise, a rereg_mr that doesn't set IB_MR_REREG_ACCESS (for
> example, one that only changes the PD) ends up clearing the
> access flags in HW since iwmr->access is zero-initialized, which
> is not intended.
>
> Fixes: 5ac388db27c4 ("RDMA/irdma: Add support to re-register a memory region")
> Signed-off-by: Jacob Moroni <jmoroni@google.com>
> ---
> drivers/infiniband/hw/irdma/verbs.c | 1 +
> 1 file changed, 1 insertion(+)
Applied to for-next
Still more preexisting Sashiko issues:
https://sashiko.dev/#/patchset/20260604154104.4035581-1-jmoroni%40google.com
This one sounds bad:
This is a pre-existing issue, but could this sequence allow arbitrary
physical memory access when an MR re-registration fails?
Sigh, rereg_mr is a trainwreck in every driver.
I fixed mlx5 a long time ago, there is a new flow now for rereg where
the driver can create a new mr from scratch and return that. irdma
should do that for any destructive change like replacing the
umem. Otherwise it is impossible to get the error semantics correct.
Jason
prev parent reply other threads:[~2026-06-05 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 15:41 [PATCH] RDMA/irdma: Initialize iwmr->access during MR registration Jacob Moroni
2026-06-05 17:14 ` 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=20260605171405.GB2771195@nvidia.com \
--to=jgg@nvidia.com \
--cc=jmoroni@google.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=tatyana.e.nikolova@intel.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