+++ /dev/null
-From 5fd825899f17e319378c847cfe4295abb3bdfebd Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 25 Feb 2026 17:38:57 -0500
-Subject: kho: fix KASAN support for restored vmalloc regions
-
-From: Pasha Tatashin <pasha.tatashin@soleen.com>
-
-[ Upstream commit 019fc36872374db6fd35e118c9e935374404bfbf ]
-
-Restored vmalloc regions are currently not properly marked for KASAN,
-causing KASAN to treat accesses to these regions as out-of-bounds.
-
-Fix this by properly unpoisoning the restored vmalloc area using
-kasan_unpoison_vmalloc(). This requires setting the VM_UNINITIALIZED flag
-during the initial area allocation and clearing it after the pages have
-been mapped and unpoisoned, using the clear_vm_uninitialized_flag()
-helper.
-
-Link: https://lkml.kernel.org/r/20260225223857.1714801-3-pasha.tatashin@soleen.com
-Fixes: a667300bd53f ("kho: add support for preserving vmalloc allocations")
-Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
-Reported-by: Pratyush Yadav <pratyush@kernel.org>
-Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
-Tested-by: Pratyush Yadav (Google) <pratyush@kernel.org>
-Cc: Alexander Graf <graf@amazon.com>
-Cc: Liam Howlett <liam.howlett@oracle.com>
-Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
-Cc: Michal Hocko <mhocko@suse.com>
-Cc: Mike Rapoport <rppt@kernel.org>
-Cc: Suren Baghdasaryan <surenb@google.com>
-Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/kexec_handover.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
-index c13b99f7c9891..2ec4c3bcec128 100644
---- a/kernel/kexec_handover.c
-+++ b/kernel/kexec_handover.c
-@@ -11,6 +11,7 @@
- #include <linux/cleanup.h>
- #include <linux/cma.h>
- #include <linux/count_zeros.h>
-+#include <linux/kasan.h>
- #include <linux/kexec.h>
- #include <linux/kexec_handover.h>
- #include <linux/libfdt.h>
-@@ -957,6 +958,7 @@ EXPORT_SYMBOL_GPL(kho_preserve_vmalloc);
- void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
- {
- struct kho_vmalloc_chunk *chunk = KHOSER_LOAD_PTR(preservation->first);
-+ kasan_vmalloc_flags_t kasan_flags = KASAN_VMALLOC_PROT_NORMAL;
- unsigned int align, order, shift, vm_flags;
- unsigned long total_pages, contig_pages;
- unsigned long addr, size;
-@@ -1008,7 +1010,8 @@ void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
- goto err_free_pages_array;
-
- area = __get_vm_area_node(total_pages * PAGE_SIZE, align, shift,
-- vm_flags, VMALLOC_START, VMALLOC_END,
-+ vm_flags | VM_UNINITIALIZED,
-+ VMALLOC_START, VMALLOC_END,
- NUMA_NO_NODE, GFP_KERNEL,
- __builtin_return_address(0));
- if (!area)
-@@ -1023,6 +1026,13 @@ void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
- area->nr_pages = total_pages;
- area->pages = pages;
-
-+ if (vm_flags & VM_ALLOC)
-+ kasan_flags |= KASAN_VMALLOC_VM_ALLOC;
-+
-+ area->addr = kasan_unpoison_vmalloc(area->addr, total_pages * PAGE_SIZE,
-+ kasan_flags);
-+ clear_vm_uninitialized_flag(area);
-+
- return area->addr;
-
- err_free_vm_area:
---
-2.53.0
-
gpu-nova-core-bitfield-fix-broken-default-implementa.patch
selftests-mm-skip-migration-tests-if-numa-is-unavail.patch
kho-make-debugfs-interface-optional.patch
-kho-fix-kasan-support-for-restored-vmalloc-regions.patch
documentation-fix-a-hugetlbfs-reservation-statement.patch
selftest-memcg-skip-memcg_sock-test-if-address-famil.patch
alsa-scarlett2-add-missing-sentinel-initializer-fiel.patch
+++ /dev/null
-From 03827d524d7732d238d448274702baef3b5cb916 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 25 Feb 2026 17:38:57 -0500
-Subject: kho: fix KASAN support for restored vmalloc regions
-
-From: Pasha Tatashin <pasha.tatashin@soleen.com>
-
-[ Upstream commit 019fc36872374db6fd35e118c9e935374404bfbf ]
-
-Restored vmalloc regions are currently not properly marked for KASAN,
-causing KASAN to treat accesses to these regions as out-of-bounds.
-
-Fix this by properly unpoisoning the restored vmalloc area using
-kasan_unpoison_vmalloc(). This requires setting the VM_UNINITIALIZED flag
-during the initial area allocation and clearing it after the pages have
-been mapped and unpoisoned, using the clear_vm_uninitialized_flag()
-helper.
-
-Link: https://lkml.kernel.org/r/20260225223857.1714801-3-pasha.tatashin@soleen.com
-Fixes: a667300bd53f ("kho: add support for preserving vmalloc allocations")
-Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
-Reported-by: Pratyush Yadav <pratyush@kernel.org>
-Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
-Tested-by: Pratyush Yadav (Google) <pratyush@kernel.org>
-Cc: Alexander Graf <graf@amazon.com>
-Cc: Liam Howlett <liam.howlett@oracle.com>
-Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
-Cc: Michal Hocko <mhocko@suse.com>
-Cc: Mike Rapoport <rppt@kernel.org>
-Cc: Suren Baghdasaryan <surenb@google.com>
-Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/liveupdate/kexec_handover.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
-index 479c42e08b74a..1ed8913c5e2c0 100644
---- a/kernel/liveupdate/kexec_handover.c
-+++ b/kernel/liveupdate/kexec_handover.c
-@@ -13,6 +13,7 @@
- #include <linux/cma.h>
- #include <linux/kmemleak.h>
- #include <linux/count_zeros.h>
-+#include <linux/kasan.h>
- #include <linux/kexec.h>
- #include <linux/kexec_handover.h>
- #include <linux/kho/abi/kexec_handover.h>
-@@ -1082,6 +1083,7 @@ EXPORT_SYMBOL_GPL(kho_unpreserve_vmalloc);
- void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
- {
- struct kho_vmalloc_chunk *chunk = KHOSER_LOAD_PTR(preservation->first);
-+ kasan_vmalloc_flags_t kasan_flags = KASAN_VMALLOC_PROT_NORMAL;
- unsigned int align, order, shift, vm_flags;
- unsigned long total_pages, contig_pages;
- unsigned long addr, size;
-@@ -1133,7 +1135,8 @@ void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
- goto err_free_pages_array;
-
- area = __get_vm_area_node(total_pages * PAGE_SIZE, align, shift,
-- vm_flags, VMALLOC_START, VMALLOC_END,
-+ vm_flags | VM_UNINITIALIZED,
-+ VMALLOC_START, VMALLOC_END,
- NUMA_NO_NODE, GFP_KERNEL,
- __builtin_return_address(0));
- if (!area)
-@@ -1148,6 +1151,13 @@ void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
- area->nr_pages = total_pages;
- area->pages = pages;
-
-+ if (vm_flags & VM_ALLOC)
-+ kasan_flags |= KASAN_VMALLOC_VM_ALLOC;
-+
-+ area->addr = kasan_unpoison_vmalloc(area->addr, total_pages * PAGE_SIZE,
-+ kasan_flags);
-+ clear_vm_uninitialized_flag(area);
-+
- return area->addr;
-
- err_free_vm_area:
---
-2.53.0
-
pci-mediatek-gen3-prevent-leaking-irq-domains-when-i.patch
gpu-nova-core-bitfield-fix-broken-default-implementa.patch
selftests-mm-skip-migration-tests-if-numa-is-unavail.patch
-kho-fix-kasan-support-for-restored-vmalloc-regions.patch
documentation-fix-a-hugetlbfs-reservation-statement.patch
docs-admin-guide-mm-damn-lru_sort-fix-intervals-auto.patch
docs-mm-damon-index-fix-typo-autoamted-automated.patch