From: Jason Gunthorpe <jgg@ziepe.ca>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3 1/2] xprtrdma: Fix DMA scatter-gather list mapping imbalance
Date: Thu, 13 Feb 2020 10:56:17 -0400 [thread overview]
Message-ID: <20200213145617.GI31668@ziepe.ca> (raw)
In-Reply-To: <595DB50E-F65A-4F52-BFDB-79161151ECDD@oracle.com>
On Thu, Feb 13, 2020 at 09:33:23AM -0500, Chuck Lever wrote:
>
>
> > On Feb 12, 2020, at 2:30 PM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
> >
> > On Wed, Feb 12, 2020 at 02:09:03PM -0500, Chuck Lever wrote:
> >>
> >>
> >>> On Feb 12, 2020, at 2:05 PM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
> >>>
> >>> On Wed, Feb 12, 2020 at 01:38:59PM -0500, Chuck Lever wrote:
> >>>>
> >>>>> On Feb 12, 2020, at 1:26 PM, Jason Gunthorpe <jgg@ziepe.ca> wrote:
> >>>>>
> >>>>> On Wed, Feb 12, 2020 at 11:12:30AM -0500, Chuck Lever wrote:
> >>>>>> The @nents value that was passed to ib_dma_map_sg() has to be passed
> >>>>>> to the matching ib_dma_unmap_sg() call. If ib_dma_map_sg() choses to
> >>>>>> concatenate sg entries, it will return a different nents value than
> >>>>>> it was passed.
> >>>>>>
> >>>>>> The bug was exposed by recent changes to the AMD IOMMU driver, which
> >>>>>> enabled sg entry concatenation.
> >>>>>>
> >>>>>> Looking all the way back to commit 4143f34e01e9 ("xprtrdma: Port to
> >>>>>> new memory registration API") and reviewing other kernel ULPs, it's
> >>>>>> not clear that the frwr_map() logic was ever correct for this case.
> >>>>>>
> >>>>>> Reported-by: Andre Tomt <andre@tomt.net>
> >>>>>> Suggested-by: Robin Murphy <robin.murphy@arm.com>
> >>>>>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> >>>>>> Cc: stable@vger.kernel.org # v5.5
> >>>>>> net/sunrpc/xprtrdma/frwr_ops.c | 13 +++++++------
> >>>>>> 1 file changed, 7 insertions(+), 6 deletions(-)
> >>>>>
> >>>>> Yep
> >>>>>
> >>>>> Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
> >>>>
> >>>> Thanks.
> >>>>
> >>>> Wondering if it makes sense to add a Fixes tag for the AMD IOMMU commit
> >>>> where NFS/RDMA stopped working, rather than the "Cc: stable # v5.5".
> >>>>
> >>>> Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api")
> >>>
> >>> Not really, this was broken for other configurations besides AMD
> >>
> >> Agreed, but the bug seems to have been inconsequential until now?
> >
> > I imagine it would get you on ARM or other archs, IIRC.
>
> That's certainly plausible, but I haven't received explicit bug reports
> in this area. (I'm not at all saying that such bugs categorically do
> not exist).
Usually I encourage people to put the fixes line to the commit that is
being fixed, pointing at some other commit that happens to expose the
bug is not the best.
> In any event, practical matters: the posted patch applies back to v5.4,
> but fails to apply starting with v5.3.
>
> I think we can leave the "Cc: stable # v5.5"; and I'm open to requests
> to backport this simple fix onto earlier stable kernels (back to v4.4),
> which can be handled case-by-case. 'Salright?
I'd just put Cc: stable, the stable folks will reject it on earlier
versions because of conflicts and we can leave it.
Jason
next prev parent reply other threads:[~2020-02-13 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 16:12 [PATCH v3 0/2] Fix NFS/RDMA operation with Ryzen IOMMU Chuck Lever
2020-02-12 16:12 ` [PATCH v3 1/2] xprtrdma: Fix DMA scatter-gather list mapping imbalance Chuck Lever
2020-02-12 18:26 ` Jason Gunthorpe
2020-02-12 18:38 ` Chuck Lever
2020-02-12 19:05 ` Jason Gunthorpe
2020-02-12 19:09 ` Chuck Lever
2020-02-12 19:30 ` Jason Gunthorpe
2020-02-13 14:33 ` Chuck Lever
2020-02-13 14:56 ` Jason Gunthorpe [this message]
2020-02-12 16:12 ` [PATCH v3 2/2] xprtrdma: Enhance MR-related trace points Chuck Lever
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=20200213145617.GI31668@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=anna.schumaker@netapp.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
/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).