On Wed, Jun 02, 2021 at 05:41:30PM -0700, Andi Kleen wrote:You weren't cc'ed originally so if you get partial emails it must be through some list.
swiotlb currently only uses the start address of a DMA to check if somethingI seem to be only CC-ed on this and #7, so please bear with me.
is in the swiotlb or not. But with virtio and untrusted hosts the host
could give some DMA mapping that crosses the swiotlb boundaries,
potentially leaking or corrupting data. Add size checks to all the swiotlb
checks and reject any DMAs that cross the swiotlb buffer boundaries.
But could you explain to me why please:
commit daf9514fd5eb098d7d6f3a1247cb8cc48fc94155 (swiotlb/stable/for-linus-5.12)
Author: Martin Radev <martin.b.radev@xxxxxxxxx>
Date: Tue Jan 12 16:07:29 2021 +0100
swiotlb: Validate bounce size in the sync/unmap path
does not solve the problem as well?