mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Chen-Yu Tsai <wenst@chromium.org>, Robin Murphy <robin.murphy@arm.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-coherent: Warn if OF reserved memory is beyond current coherent DMA mask
Date: Tue, 22 Apr 2025 19:43:28 +0200	[thread overview]
Message-ID: <6f6ea4c2-01f0-4eff-8b04-66a655f75cca@samsung.com> (raw)
In-Reply-To: <20250421083930.374173-1-wenst@chromium.org>

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@chromium.org>

Thanks, applied to dma-mapping-fixes branch.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


      reply	other threads:[~2025-04-22 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250421083941eucas1p28b1de88f77e9de88f52b2c72918c9561@eucas1p2.samsung.com>
2025-04-21  8:39 ` Chen-Yu Tsai
2025-04-22 17:43   ` Marek Szyprowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f6ea4c2-01f0-4eff-8b04-66a655f75cca@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®