Thread (58 messages) 58 messages, 10 authors, 2021-02-09

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

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-01-12 23:40:29
Also in: linux-iommu, linuxppc-dev, lkml, xen-devel

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 <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help