Go to file
Shanker Donthineni 9a0b5fdce1 dma/pool: Ensure DMA_DIRECT_REMAP allocations are decrypted
commit 89a2d212bd upstream.

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@vger.kernel.org
Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20250811181759.998805-1-sdonthineni@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-09-04 14:28:47 +02:00
arch KVM: x86: use array_index_nospec with indices that come from guest 2025-09-04 14:28:46 +02:00
block block: avoid possible overflow for chunk_sectors check in blk_stack_limits() 2025-08-28 16:24:25 +02:00
certs
crypto
Documentation asm-generic: Add memory barrier dma_mb() 2025-08-28 16:24:36 +02:00
drivers Revert "drm/amdgpu: fix incorrect vm flags to map bo" 2025-09-04 14:28:47 +02:00
fs efivarfs: Fix slab-out-of-bounds in efivarfs_d_compare 2025-09-04 14:28:46 +02:00
include atm: atmtcp: Prevent arbitrary write in atmtcp_recv_control(). 2025-09-04 14:28:45 +02:00
init
io_uring
ipc
kernel dma/pool: Ensure DMA_DIRECT_REMAP allocations are decrypted 2025-09-04 14:28:47 +02:00
lib
LICENSES
mm mm/page_alloc: detect allocation forbidden by cpuset and bail out early 2025-08-28 16:24:37 +02:00
net sctp: initialize more fields in sctp_v6_from_sk() 2025-09-04 14:28:46 +02:00
samples
scripts kconfig: lxdialog: fix 'space' to (de)select options 2025-08-28 16:24:25 +02:00
security
sound ASoC: codecs: tx-macro: correct tx_macro_component_drv name 2025-09-04 14:28:44 +02:00
tools selftests: mptcp: pm: check flush doesn't reset limits 2025-08-28 16:24:37 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.15.190 2025-08-28 16:24:39 +02:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.