linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: zyjzyj2000@gmail.com, leonro@nvidia.com,
	linux-rdma@vger.kernel.org, Rao.Shoaib@oracle.com
Subject: Re: [PATCH] RDMA/rxe: Fix parameter errors
Date: Mon, 6 Mar 2023 16:51:19 -0400	[thread overview]
Message-ID: <ZAZSR2g4ZzESuXRc@nvidia.com> (raw)
In-Reply-To: <108cf8f1-6123-620e-8700-53246c7a8287@gmail.com>

On Wed, Mar 01, 2023 at 05:15:07PM -0600, Bob Pearson wrote:
> On 1/19/23 13:18, Jason Gunthorpe wrote:
> > On Thu, Jan 19, 2023 at 12:05:07PM -0600, Bob Pearson wrote:
> >> Correct errors in rxe_param.h caused by extending the range of
> >> indices for MRs allowing it to overlap the range for MWs. Since
> >> the driver determines whether an rkey is for an MR or MW by comparing
> >> the index part of the rkey with these ranges this can cause an
> >> MR to be incorrectly determined to be an MW.
> >>
> >> Additionally the parameters which determine the size of the index
> >> ranges for MR, MW, QP and SRQ are incorrect since the actual
> >> number of integers in the range [min, max] is (max - min + 1) not
> >> (max - min).
> >>
> >> This patch corrects these errors.
> >>
> >> Fixes: 0994a1bcd5f7 ("RDMA/rxe: Bump up default maximum values used via uverbs")
> >> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> >> ---
> >>  drivers/infiniband/sw/rxe/rxe_param.h | 27 +++++++++++++++++++--------
> >>  1 file changed, 19 insertions(+), 8 deletions(-)
> > 
> > This
> > 
> > commit 1aefe5c177c1922119afb4ee443ddd6ac3140b37
> > Author: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
> > Date:   Tue Dec 20 17:08:48 2022 +0900
> > 
> >     RDMA/rxe: Prevent faulty rkey generation
> >     
> >     If you create MRs more than 0x10000 times after loading the module,
> >     responder starts to reply NAKs for RDMA/Atomic operations because of rkey
> >     violation detected in check_rkey(). The root cause is that rkeys are
> >     incremented each time a new MR is created and the value overflows into the
> >     range reserved for MWs.
> >     
> >     This commit also increases the value of RXE_MAX_MW that has been limited
> >     unlike other parameters.
> >     
> >     Fixes: 0994a1bcd5f7 ("RDMA/rxe: Bump up default maximum values used via uverbs")
> >     Link: https://lore.kernel.org/r/20221220080848.253785-2-matsuda-daisuke@fujitsu.com
> >     Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
> >     Tested-by: Li Zhijian <lizhijian@fujitsu.com>
> >     Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
> >     Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> > 
> > 
> > Is already in v6.2-rc and conflicts with this patch, it looks like it
> > is doing the same thing, can you sort it out please?
> > 
> > Thanks,
> > Jason
> 
> Did this get lost? for-next is now at 6.2-rc3 now and the bug is
> still in rxe_param.h.

Check again we are at v6.3-rc1 now, if something needs to be fixed
send a new patch..

Jason

  reply	other threads:[~2023-03-06 20:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 18:05 [PATCH] RDMA/rxe: Fix parameter errors Bob Pearson
2023-01-19 19:18 ` Jason Gunthorpe
2023-01-19 20:18   ` Bob Pearson
2023-03-01 23:15   ` Bob Pearson
2023-03-06 20:51     ` Jason Gunthorpe [this message]
2023-03-13 19:55       ` Bob Pearson

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=ZAZSR2g4ZzESuXRc@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=Rao.Shoaib@oracle.com \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.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;
as well as URLs for NNTP newsgroup(s).