[RFC PATCH v3 3/6] swiotlb: Use restricted DMA pool if available
Florian Fainelli
f.fainelli at gmail.com
Wed Jan 13 10:39:23 AEDT 2021
On 1/5/21 7:41 PM, Claire Chang wrote:
> Regardless of swiotlb setting, the restricted DMA pool is preferred if
> available.
>
> The restricted DMA pools provide a basic level of protection against
> the DMA overwriting buffer contents at unexpected times. However, to
> protect against general data leakage and system memory corruption, the
> system needs to provide a way to restrict the DMA to a predefined memory
> region.
>
> Signed-off-by: Claire Chang <tientzu at chromium.org>
You could probably split this patch into two:
- one that introduces the get_io_tlb_mem() getter, updates all callers
of is_swiotlb_buffer() to gain a 'struct device' argument
- another one that does add support for a non-default swiotlb pool and
adds dev->dma_io_tlb_mem
Other than that, LGTM!
--
Florian
More information about the Linuxppc-dev
mailing list