From: Robin Murphy <robin.murphy@arm.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, linux-mm@kvack.org, harry@kernel.org,
vbabka@kernel.org, akpm@linux-foundation.org,
stern@rowland.harvard.edu, linux@roeck-us.net, hch@lst.de,
Jeff.kirsher@gmail.com, catalin.marinas@arm.com
Subject: Re: [PATCH v2] dma-debug: suppress cacheline overlap warning when arch has no DMA alignment requirement
Date: Wed, 1 Apr 2026 16:26:14 +0100 [thread overview]
Message-ID: <75f65aa7-4f89-4ef8-8941-51b1d54d1ad3@arm.com> (raw)
In-Reply-To: <CAHp75VdrGk=foAzQBJNRNDZ1yfFY8p-tC_ApM8_gN4EehpmN_Q@mail.gmail.com>
On 2026-04-01 2:25 pm, Andy Shevchenko wrote:
> On Wed, Apr 1, 2026 at 3:11 PM Robin Murphy <robin.murphy@arm.com> wrote:
>> On 2026-03-30 8:44 am, Marek Szyprowski wrote:
>>> On 27.03.2026 13:41, Mikhail Gavrilov wrote:
>
> ...
>
>> TBH I'd be inclined to have CONFIG_DMA_DEBUG raise ARCH_DMA_MINALIGN as
>> appropriate such that genuine false-positives can't happen, rather than
>> effectively defeat the whole check,
>
> I dunno if you read v1 thread, where I proposed to unroll the check
> and use pr_debug_once() for the cases which we expect not to panic,
> but would be good to have a track of.
I had not seen v1, as I took the last 3 days off and hadn't got that far
up my inbox yet - I guess it's at least reassuring to have reached
similar conclusions independently :)
The fundamental issue here is that dma-debug doesn't realistically have
a way to know whether the thing being mapped is intentionally a whole
dedicated kmalloc allocation - where we can trust SLUB (and
DMA_BOUNCE_UNALIGNED_KMALLOC if appropriate) to do the right thing
across different systems - or just something which might happen to line
up by coincidence on someone's development machine, but for portability
they definitely do still need to take explicit care about (e.g. struct
devres::data).
Certainly some milder and/or opt-in reporting of
potential-false-positive overlaps wouldn't be a terrible idea, if
someone wants to have a crack at it.
Thanks,
Robin.
next prev parent reply other threads:[~2026-04-01 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260327124211eucas1p10425a28f67736d2043e7e4dd77d58e72@eucas1p1.samsung.com>
2026-03-27 12:41 ` Mikhail Gavrilov
2026-03-30 7:44 ` Marek Szyprowski
2026-04-01 12:11 ` Robin Murphy
2026-04-01 13:25 ` Andy Shevchenko
2026-04-01 15:26 ` Robin Murphy [this message]
2026-04-02 11:26 ` Marek Szyprowski
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=75f65aa7-4f89-4ef8-8941-51b1d54d1ad3@arm.com \
--to=robin.murphy@arm.com \
--cc=Jeff.kirsher@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=harry@kernel.org \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=m.szyprowski@samsung.com \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=vbabka@kernel.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