From: Karl Mehltretter <kmehltretter@gmail.com>
To: Rob Clark <rob.clark@oss.qualcomm.com>
Cc: "Christian König" <christian.koenig@amd.com>,
"Jianfeng Liu" <liujianfeng1994@gmail.com>,
dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Bryan O'Donoghue" <bod.linux@nxsw.ie>,
"Dmitry Baryshkov" <lumag@kernel.org>,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH] Revert "dma-buf: Make DMABUF_DEBUG default to y on DEBUG_KERNEL kernels"
Date: Mon, 28 Sep 2026 21:39:05 +0200 [thread overview]
Message-ID: <arrAvk4aYQ4sDEzN@gmail.com> (raw)
In-Reply-To: <CACSVV02BPHGeGFo0vs8-Q2JvcvQ_gw_xe4kZj_nuzk8n6sW7kg@mail.gmail.com>
On Mon, Sep 28, 2026 at 04:21:41AM +0100, Rob Clark wrote:
> On Mon, Sep 28, 2026 at 3:48 AM Christian König
> > What I can offer is to set it to default N for another few month to give you more time to fix things.
>
> If it is disabled by default in distro kernels, that sounds fine.
Another option is to restore the earlier DMABUF_DEBUG default for now,
although off by default is also fine with me:
default y if DMA_API_DEBUG
I would like to help fix the affected importers, and have started work
on several of them. Beyond msm, my LLM agent found paths that use the
page or CPU-length fields of imported attachment tables in:
- rockchip, tegra, rcar-du/VSP, omapdrm and xen_drm_front;
- tegra-vde, staging ipu3, pxa_camera and sur40;
- fastrpc's SECUREMAP path;
- the IIO dmaengine buffer, USB FunctionFS and UVC gadget DMABUF paths.
The host1x imported-buffer gather path also looks susceptible. There
are less severe cases too: amdxdna rejects the affected import, while
mali-dp loses MMU prefetch.
For sur40, IIO, FunctionFS and UVC gadget, I have reproduced failures
and tested local fixes in QEMU using local device models. The other
entries above are findings from source inspection, not hardware tests.
Some failures depend on the architecture and configuration, in
particular whether NEED_SG_DMA_LENGTH is enabled.
Unfortunately, I don't have hardware for most of these drivers...
I think the drivers managing their own IOMMU mappings also need a
clearer supported path here. Simply switching from physical addresses
to DMA addresses is not generally sufficient, since the latter belong
to the attachment device's address space.
I also have a draft warning-only mode for DMABUF_DEBUG that I can post
as an RFC. It preserves the CPU fields and logs suspect accesses
instead of deliberately breaking importers. Coverage is incomplete
and the underlying bugs still need fixing; strict mode would remain
available.
Thanks,
Karl
prev parent reply other threads:[~2026-09-28 19:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 2:20 Jianfeng Liu
2026-09-26 18:40 ` Rob Clark
2026-09-28 8:18 ` Christian König
2026-09-28 10:36 ` Rob Clark
2026-09-28 10:47 ` Christian König
2026-09-28 11:21 ` Rob Clark
2026-09-28 19:39 ` Karl Mehltretter [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=arrAvk4aYQ4sDEzN@gmail.com \
--to=kmehltretter@gmail.com \
--cc=bod.linux@nxsw.ie \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=liujianfeng1994@gmail.com \
--cc=lumag@kernel.org \
--cc=rob.clark@oss.qualcomm.com \
--cc=sumit.semwal@linaro.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®