From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,urezki@gmail.com,pjw@kernel.org,palmer@dabbelt.com,aou@eecs.berkeley.edu,alex@ghiti.fr,liuye@kylinos.cn,akpm@linux-foundation.org
Subject: [merged mm-stable] mm-vmalloc-fix-vmalloc_dump_obj-address-alignment-for-last-page-lookups.patch removed from -mm tree
Date: Sat, 24 Oct 2026 01:58:17 -0700 [thread overview]
Message-ID: <20261024085818.0C3AF1F01829@smtp.kernel.org> (raw)
The quilt patch titled
Subject: mm/vmalloc: fix vmalloc_dump_obj address alignment for last-page lookups
has been removed from the -mm tree. Its filename was
mm-vmalloc-fix-vmalloc_dump_obj-address-alignment-for-last-page-lookups.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Ye Liu <liuye@kylinos.cn>
Subject: mm/vmalloc: fix vmalloc_dump_obj address alignment for last-page lookups
Date: Mon, 28 Sep 2026 16:15:54 +0800
Patch series "mm/vmalloc: fix vmalloc_dump_obj VA lookup", v4.
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.
This patch (of 2):
vmalloc_dump_obj() uses PAGE_ALIGN() to normalize the input address before
looking it up in the per-node busy tree. PAGE_ALIGN() rounds up, which
can push an address in the last page of a vmalloc allocation to va_end --
outside the [va_start, va_end) range that __find_vmap_area() searches.
This causes the lookup to miss the VA and return false, degrading
diagnostic output in OOM dumps and KASAN reports to the less informative
"vmalloc memory" fallback.
The upward alignment can also change the addr_to_node() mapping when the
page boundary crosses a vmap zone boundary, causing the search to hit the
wrong node entirely.
Use PAGE_ALIGN_DOWN() instead, which rounds down to the page containing
the address. This keeps the address within the VA range and preserves the
correct node mapping.
Link: https://lore.kernel.org/20260928-vmalloc_dump_obj-v4-0-6f288a431edc@linux.dev
Link: https://lore.kernel.org/20260928-vmalloc_dump_obj-v4-1-6f288a431edc@linux.dev
Signed-off-by: Ye Liu <liuye@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Paul Walmsley <pjw@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/vmalloc.c~mm-vmalloc-fix-vmalloc_dump_obj-address-alignment-for-last-page-lookups
+++ a/mm/vmalloc.c
@@ -5268,7 +5268,7 @@ bool vmalloc_dump_obj(void *object)
unsigned long addr;
unsigned long nr_pages;
- addr = PAGE_ALIGN((unsigned long) object);
+ addr = PAGE_ALIGN_DOWN((unsigned long) object);
vn = addr_to_node(addr);
if (!spin_trylock(&vn->busy.lock))
_
Patches currently in -mm which might be from liuye@kylinos.cn are
reply other threads:[~2026-10-24 8:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261024085818.0C3AF1F01829@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=liuye@kylinos.cn \
--cc=mm-commits@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=urezki@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.