]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: Add restricted DMA pool initialization
authorClaire Chang <tientzu@chromium.org>
Sat, 19 Jun 2021 03:40:41 +0000 (11:40 +0800)
committerKonrad Rzeszutek Wilk <konrad@kernel.org>
Wed, 14 Jul 2021 00:04:50 +0000 (20:04 -0400)
commit4920c9b59b48376fd0f7d1e22f22a4ab0352187d
tree321b1f2c11eb5088fb8df9d9033fd37abb9cad41
parent86267247d08a421b9347d03df3f7b66556f81f71
swiotlb: Add restricted DMA pool initialization

Add the initialization function to create restricted DMA pools from
matching reserved-memory nodes.

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 lock down the memory access, e.g., MPU.

Signed-off-by: Claire Chang <tientzu@chromium.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Tested-by: Will Deacon <will@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
include/linux/swiotlb.h
kernel/dma/Kconfig
kernel/dma/swiotlb.c