Re: [PATCH v2 7/8] dma-direct: set decrypted flag for remapped DMA allocations

Jason Gunthorpe
2026-04-21T12:34:21Z

On Mon, Apr 20, 2026 at 11:44:14AM +0530, Aneesh Kumar K.V (Arm) wrote:
> Devices that are DMA non-coherent and require a remap were skipping
> dma_set_decrypted(), leaving DMA buffers encrypted even when the device
> requires unencrypted access. Move the call after the if (remap) branch
> so that both the direct and remapped allocation paths correctly mark the
> allocation as decrypted (or fail cleanly) before use.
>
> Architectures such as arm64 cannot mark vmap addresses as decrypted, and
> highmem pages necessarily require a vmap remap.

I don't think I saw an aswer for this, why can't arm accept
pgprot_decrypted() for vmap? It really should, I don't think we should
have these minor pointless arch differences.

Suzuki? You mentioned it, can you elaborate?

Jason