On Sat, Mar 5, 2022 at 9:07 AM Halil Pasic pasic@linux.ibm.com wrote:
Unfortunately, we ended up merging an old version of the patch "fix info leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph (the swiotlb maintainer), he asked me to create an incremental fix (after I have pointed this out the mix up, and asked him for guidance). So here we go.
[...]
Christoph, I am assuming I'll get this from you, but if you have nothing else pending, just holler and I can take it directly.
That said, it seems sad to bounce the buffer just in case the device doesn't do what we expect it to do. Wouldn't it be better to just clear the buffer instead of copying the old data into it?
Also, possibly stupid question - when is swiotlb used in practice these days? What are the performance implications of this? Will this mean completely unnecessary copies for all normal IO that will be overwritten by the DMA? Can't we limit it to just SG_IO (or is it already for some reason)?
Linus