mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mm/vmalloc: fix vmalloc_dump_obj VA lookup
@ 2026-09-24  8:51 Ye Liu
  2026-09-24  8:51 ` [PATCH v3 1/2] mm/vmalloc: fix vmalloc_dump_obj address alignment for last-page lookups Ye Liu
  2026-09-24  8:51 ` [PATCH v3 2/2] mm/vmalloc: fix vmalloc_dump_obj cross-zone VA lookup Ye Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Ye Liu @ 2026-09-24  8:51 UTC (permalink / raw)
  To: Andrew Morton, Uladzislau Rezki, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Alexandre Ghiti
  Cc: linux-mm, linux-kernel, linux-riscv, Ye Liu

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@kylinos.cn>
---
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

 mm/vmalloc.c | 113 ++++++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 70 insertions(+), 43 deletions(-)
---
base-commit: e6e35979777d646fe3c7c94dca7dd32fb25d45f4
change-id: 20260916-vmalloc_dump_obj-d80908447369

Best regards,
-- 
Ye Liu <ye.liu@linux.dev>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-24  8:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24  8:51 [PATCH v3 0/2] mm/vmalloc: fix vmalloc_dump_obj VA lookup Ye Liu
2026-09-24  8:51 ` [PATCH v3 1/2] mm/vmalloc: fix vmalloc_dump_obj address alignment for last-page lookups Ye Liu
2026-09-24  8:51 ` [PATCH v3 2/2] mm/vmalloc: fix vmalloc_dump_obj cross-zone VA lookup Ye Liu

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®