summaryrefslogtreecommitdiff
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wenst@chromium.org>2025-04-21 11:39:29 +0300
committerMarek Szyprowski <m.szyprowski@samsung.com>2025-04-22 18:44:09 +0300
commit89461db349cc00816c01d55507d511466b3b7151 (patch)
tree006a0a7e8dada030c3b675ece0cfb0b800d29410 /rust/helpers/mutex.c
parentcae5572ec9261f752af834cdaaf5a0ba0afcf256 (diff)
downloadlinux-89461db349cc00816c01d55507d511466b3b7151.tar.xz
dma-coherent: Warn if OF reserved memory is beyond current coherent DMA mask
When a reserved memory region described in the device tree is attached to a device, it is expected that the device's limitations are correctly included in that description. However, if the device driver failed to implement DMA address masking or addressing beyond the default 32 bits (on arm64), then bad things could happen because the DMA address was truncated, such as playing back audio with no actual audio coming out, or DMA overwriting random blocks of kernel memory. Check against the coherent DMA mask when the memory regions are attached to the device. Give a warning when the memory region can not be covered by the mask. A warning instead of a hard error was chosen, because it is possible that existing drivers could be working fine even if they forgot to extend the coherent DMA mask. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20250421083930.374173-1-wenst@chromium.org
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions