From: Sasha Levin Date: Mon, 18 May 2026 13:24:47 +0000 (-0400) Subject: Drop kho-fix-kasan-support-for-restored-vmalloc-regions.patch X-Git-Tag: v6.6.141~70 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a6c3a2bbf9abee7a1860fe95197c471f5331cad0;p=thirdparty%2Fkernel%2Fstable-queue.git Drop kho-fix-kasan-support-for-restored-vmalloc-regions.patch Signed-off-by: Sasha Levin --- diff --git a/queue-6.18/kho-fix-kasan-support-for-restored-vmalloc-regions.patch b/queue-6.18/kho-fix-kasan-support-for-restored-vmalloc-regions.patch deleted file mode 100644 index c6c4123d05..0000000000 --- a/queue-6.18/kho-fix-kasan-support-for-restored-vmalloc-regions.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 5fd825899f17e319378c847cfe4295abb3bdfebd Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 25 Feb 2026 17:38:57 -0500 -Subject: kho: fix KASAN support for restored vmalloc regions - -From: Pasha Tatashin - -[ 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 -Reported-by: Pratyush Yadav -Reviewed-by: Pratyush Yadav (Google) -Tested-by: Pratyush Yadav (Google) -Cc: Alexander Graf -Cc: Liam Howlett -Cc: Lorenzo Stoakes -Cc: Michal Hocko -Cc: Mike Rapoport -Cc: Suren Baghdasaryan -Cc: "Uladzislau Rezki (Sony)" -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - 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 - #include - #include -+#include - #include - #include - #include -@@ -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 - diff --git a/queue-6.18/series b/queue-6.18/series index 2bff64768c..5d0c3d2220 100644 --- a/queue-6.18/series +++ b/queue-6.18/series @@ -309,7 +309,6 @@ gpu-nova-core-bitfield-move-bitfield-specific-code-f.patch 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 diff --git a/queue-7.0/kho-fix-kasan-support-for-restored-vmalloc-regions.patch b/queue-7.0/kho-fix-kasan-support-for-restored-vmalloc-regions.patch deleted file mode 100644 index 94fa618c69..0000000000 --- a/queue-7.0/kho-fix-kasan-support-for-restored-vmalloc-regions.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 03827d524d7732d238d448274702baef3b5cb916 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 25 Feb 2026 17:38:57 -0500 -Subject: kho: fix KASAN support for restored vmalloc regions - -From: Pasha Tatashin - -[ 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 -Reported-by: Pratyush Yadav -Reviewed-by: Pratyush Yadav (Google) -Tested-by: Pratyush Yadav (Google) -Cc: Alexander Graf -Cc: Liam Howlett -Cc: Lorenzo Stoakes -Cc: Michal Hocko -Cc: Mike Rapoport -Cc: Suren Baghdasaryan -Cc: "Uladzislau Rezki (Sony)" -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - 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 - #include - #include -+#include - #include - #include - #include -@@ -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 - diff --git a/queue-7.0/series b/queue-7.0/series index 16ae598597..c71b86957c 100644 --- a/queue-7.0/series +++ b/queue-7.0/series @@ -396,7 +396,6 @@ dt-bindings-pci-imx6q-pcie-fix-maxitems-of-clocks-an.patch 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