From: Huan Yang <link@vivo.com>
To: "Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Dave Airlie" <airlied@redhat.com>,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Huan Yang <link@vivo.com>
Subject: [PATCH 0/2] Fix udmabuf vmap error
Date: Tue, 15 Apr 2025 11:15:45 +0800 [thread overview]
Message-ID: <20250415031548.2007942-1-link@vivo.com> (raw)
In [1] Bingbu report an error that vmap_udmabuf invoke failed due to use
vmap_pfn and blocked by !pfn_valid.
Due to misunderstand it, I change vmap_pfn check of !pfn_valid to
pfn_valid, then send [2], then Christoph point that:
vmap_pfn is entirely for memory not backed by pages or folios,
i.e. PCIe BARs and similar memory. This must not be mixed with proper
folio backed memory.
So, I given a misuse of vmap_pfn. But to fix vmap_udmabuf, and consider
HVO effect, I offer a RFC patchset [3], which simple copy vmap_pfn to
vmap_udmabuf, other implement folio range based vmap.
But in [3], Muchun point that I misunderstand HVO, which do not
released any page struct pointer in vmemmap, only change this VA's PTE
point to hugetlb's **HEAD** page frame, and release remainned **tail** page
frame. So any page struct pointer do exist, and folio_page, folio_pfn or
other api still can work.
By this, we can fix this error simpliy:
Patch 1 revert this vmap_pfn misuse patch.
Patch 2 fix missed offset page set.
[1] https://lore.kernel.org/all/9172a601-c360-0d5b-ba1b-33deba430455@linux.intel.com/
[2] https://lore.kernel.org/all/20250312061513.1126496-1-link@vivo.com/
[3] https://lore.kernel.org/all/20250327092922.536-1-link@vivo.com/
Huan Yang (2):
Revert "udmabuf: fix vmap_udmabuf error page set"
udmabuf: fix vmap missed offset page
drivers/dma-buf/Kconfig | 1 -
drivers/dma-buf/udmabuf.c | 23 ++++++++---------------
2 files changed, 8 insertions(+), 16 deletions(-)
base-commit: b425262c07a6a643ebeed91046e161e20b944164
--
2.48.1
next reply other threads:[~2025-04-15 3:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 3:15 Huan Yang [this message]
2025-04-15 3:15 ` [PATCH 1/2] Revert "udmabuf: fix vmap_udmabuf error page set" Huan Yang
2025-04-22 5:14 ` Kasireddy, Vivek
2025-04-23 7:22 ` Huan Yang
2025-04-23 7:26 ` Huan Yang
2025-04-28 4:16 ` Kasireddy, Vivek
2025-04-28 7:03 ` Huan Yang
2025-04-15 3:15 ` [PATCH 2/2] udmabuf: fix vmap missed offset page Huan Yang
2025-04-22 5:22 ` Kasireddy, Vivek
2025-04-23 7:25 ` Huan Yang
2025-04-25 2:59 ` Bingbu Cao
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=20250415031548.2007942-1-link@vivo.com \
--to=link@vivo.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=sumit.semwal@linaro.org \
--cc=vivek.kasireddy@intel.com \
/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®