[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: DMA direct mapping fix for 5.4 and earlier stable branches
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

 \ /
  Last update: 2021-02-09 16:52    [W:0.094 / U:1.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site