[PATCH v2] dma/pool: Ensure DMA_DIRECT_REMAP allocations are decrypted
Marek Szyprowski
m.szyprowski at samsung.com
Wed Aug 13 02:24:49 PDT 2025
On 11.08.2025 20:17, Shanker Donthineni wrote:
> When CONFIG_DMA_DIRECT_REMAP is enabled, atomic pool pages are
> remapped via dma_common_contiguous_remap() using the supplied
> pgprot. Currently, the mapping uses
> pgprot_dmacoherent(PAGE_KERNEL), which leaves the memory encrypted
> on systems with memory encryption enabled (e.g., ARM CCA Realms).
>
> This can cause the DMA layer to fail or crash when accessing the
> memory, as the underlying physical pages are not configured as
> expected.
>
> Fix this by requesting a decrypted mapping in the vmap() call:
> pgprot_decrypted(pgprot_dmacoherent(PAGE_KERNEL))
>
> This ensures that atomic pool memory is consistently mapped
> unencrypted.
>
> Cc: stable at vger.kernel.org
> Signed-off-by: Shanker Donthineni <sdonthineni at nvidia.com>
Thanks, applied to dma-mapping-fixes branch.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
More information about the linux-arm-kernel
mailing list