[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6f6ea4c2-01f0-4eff-8b04-66a655f75cca@samsung.com>
Date: Tue, 22 Apr 2025 19:43:28 +0200
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Chen-Yu Tsai <wenst@...omium.org>, Robin Murphy <robin.murphy@....com>
Cc: iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma-coherent: Warn if OF reserved memory is beyond
current coherent DMA mask
On 21.04.2025 10:39, Chen-Yu Tsai wrote:
> 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@...omium.org>
Thanks, applied to dma-mapping-fixes branch.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Powered by blists - more mailing lists