[PATCH v4 0/2] mm/vmalloc: fix vmalloc_dump_obj VA lookup

Uladzislau Rezki urezki at gmail.com
Mon Sep 28 02:07:21 PDT 2026


On Mon, Sep 28, 2026 at 04:15:53PM +0800, Ye Liu wrote:
> vmalloc_dump_obj() has two bugs that cause it to miss vmalloc
> allocations.
> 
>   1. PAGE_ALIGN() rounds up, pushing last-page addresses to va_end
>      and outside the VA lookup range.
> 
>   2. The function searches only one vmap node, but allocations
>      larger than 64 KiB may span multiple vmap zones whose VA
>      is stored in a different node's rb-tree.
> 
> Patch 1 fixes the alignment, patch 2 fixes the cross-zone search.
> 
> Signed-off-by: Ye Liu <liuye at kylinos.cn>
> ---
> Changes in v4:
> - Patch2: Simplify find_vmap_area() to return va directly.
> - Patch2: Simplify locked_vn initialization in find_vmap_area_lock().
> - Link to v3: https://lore.kernel.org/r/20260924-vmalloc_dump_obj-v3-0-5bdee3da37b3@linux.dev
> 
> Changes in v3:
> - Patch3 drop.
> - Patch2 Extract find_vmap_area_lock as a helper to simplify the code.
> - Link to v2: https://lore.kernel.org/r/20260921-vmalloc_dump_obj-v2-0-73fceb3ed1c8@linux.dev
> 
> Changes in v2:
> - Use is_vmalloc_or_module_addr() instead of is_vmalloc_addr() to
>   avoid filtering module/BPF/execmem addresses. (sashiko-bot)
> - Link to v1: https://lore.kernel.org/r/20260916-vmalloc_dump_obj-v1-0-7aa402d224df@linux.dev
> 
> ---
> Ye Liu (2):
>       mm/vmalloc: fix vmalloc_dump_obj address alignment for last-page lookups
>       mm/vmalloc: fix vmalloc_dump_obj cross-zone VA lookup
> 
Both look good to me.

Thank you.

--
Uladzislau Rezki



More information about the linux-riscv mailing list