public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Sumit Garg <sumit.garg@linaro.org>,
	Christoph Hellwig <hch@lst.de>,
	Greg KH <gregkh@linuxfoundation.org>,
	obayashi.yoshimasa@socionext.com, m.szyprowski@samsung.com,
	iommu@lists.linux-foundation.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	Daniel Thompson <daniel.thompson@linaro.org>
Subject: Re: DMA direct mapping fix for 5.4 and earlier stable branches
Date: Tue, 9 Feb 2021 16:50:58 +0100	[thread overview]
Message-ID: <20210209155058.GA8912@lst.de> (raw)
In-Reply-To: <e36b8a7d-a999-da09-d7d9-cc26579a65d1@arm.com>

On Tue, Feb 09, 2021 at 12:45:11PM +0000, Robin Murphy wrote:
> It's not a bug, it's a fundamental design failure. dma_get_sgtable() has 
> only ever sort-of-worked for DMA buffers that come from CMA or regular page 
> allocations. In particular, a "no-map" DMA pool is not backed by kernel 
> memory, so does not have any corresponding page structs, so it's impossible 
> to generate a *valid* scatterlist to represent memory from that pool, 
> regardless of what you might get away with provided you don't poke too hard 
> at it.
>
> It is not a good API...

Yes, I don't think anyone should add new users of the API.

That being said the commit he is trying to backport fixes a bug in
the implementation that at least in theory could also affect in-tree
drivers.

  reply	other threads:[~2021-02-09 15:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  6:09 DMA direct mapping fix for 5.4 and earlier stable branches Sumit Garg
2021-02-09  6:58 ` Greg Kroah-Hartman
2021-02-09  7:58   ` Sumit Garg
2021-02-09  8:04     ` Greg Kroah-Hartman
2021-02-09  9:05       ` obayashi.yoshimasa
2021-02-09  9:23         ` Greg KH
2021-02-09  9:36           ` Christoph Hellwig
2021-02-09 12:36             ` Sumit Garg
2021-02-09 12:45               ` Robin Murphy
2021-02-09 15:50                 ` Christoph Hellwig [this message]
2021-02-09 10:19           ` obayashi.yoshimasa
2021-02-09 10:39             ` Greg KH

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=20210209155058.GA8912@lst.de \
    --to=hch@lst.de \
    --cc=daniel.thompson@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=obayashi.yoshimasa@socionext.com \
    --cc=robin.murphy@arm.com \
    --cc=stable@vger.kernel.org \
    --cc=sumit.garg@linaro.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