Re: [RFC PATCH v3 3/6] swiotlb: Use restricted DMA pool if available

2021-01-13 Thread Christoph Hellwig
> +#ifdef CONFIG_SWIOTLB > + if (unlikely(swiotlb_force == SWIOTLB_FORCE) || dev->dma_io_tlb_mem) > return swiotlb_map(dev, phys, size, dir, attrs); > +#endif Please provide a wrapper for the dev->dma_io_tlb_mem check that always returns false if the per-device swiotlb support is

Re: [RFC PATCH v3 3/6] swiotlb: Use restricted DMA pool if available

2021-01-12 Thread Florian Fainelli
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 dat

[RFC PATCH v3 3/6] swiotlb: Use restricted DMA pool if available

2021-01-05 Thread Claire Chang
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