[PATCH] dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING

Christoph Hellwig hch at lst.de
Mon Nov 1 23:43:56 PDT 2021


On Tue, Nov 02, 2021 at 11:21:16AM +0800, Walter Wu wrote:
> Our platform is arch64. We need a dynamic allocated buffer from CMA is
> not to read by CPU peculative execution, so we need to remove its
> kernel mapping.

If your CPU speculates into unused kernel direct mappings your have
a worse problem than this, because all the dma coherent allocations for
non-coherent devices still have a cachable direct mapping.  Will
mentioned he wanted to look into getting rid of that mapping now that
the core dma code has the infrastucture for that, so adding him here.



More information about the Linux-mediatek mailing list