Re: [PATCH] mm/vmalloc: fix mischeck pfn valid in vmap_pfns
From: Huan Yang
Date: Sun Mar 23 2025 - 22:13:24 EST
HI Hillf,
Thanks fo your suggestion.
在 2025/3/19 19:26, Hillf Danton 写道:
On Wed, 19 Mar 2025 09:08:51 +0100 Christoph Hellwig wrote:
On Wed, Mar 19, 2025 at 01:03:55PM +0800, Hillf Danton wrote:
A quick fix is to add a vmap_pfn variant to walk around the pfn
check in question, like the following diff (just for idea show).
No.
Patient to see your fix, given no low hanging peach left for Mr Folio
in case of HVO, (feel free to ignore, who is likely about 2.6-mile
less tough than you could be).
I now believe there are two way to resolve the HVO folio can't vmap in udmabuf.
1. simple copy vmap_pfn code, don't bother common vmap_pfn, use by itself and remove pfn_valid check.
2. implement folio array based vmap(vmap_folios), which can given a range of each folio(offset, nr_pages), so can suit HVO folio's vmap.
1 is simple and can fast fix this issue, but may not too good. I need discuss with bot Christoph and udmabuf's maintainer.
2 is hard, but may worth to research, which I also will try to do. :)