* [merged mm-stable] kmsan-fix-usage-of-kmsan_enter_runtime-in-kmsan_vmap_pages_range_noflush.patch removed from -mm tree
@ 2025-05-21 16:56 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-05-21 16:56 UTC (permalink / raw)
To: mm-commits, kent.overstreet, iii, elver, dvyukov, bvanassche,
glider, akpm
The quilt patch titled
Subject: kmsan: fix usage of kmsan_enter_runtime() in kmsan_vmap_pages_range_noflush()
has been removed from the -mm tree. Its filename was
kmsan-fix-usage-of-kmsan_enter_runtime-in-kmsan_vmap_pages_range_noflush.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: Alexander Potapenko <glider@google.com>
Subject: kmsan: fix usage of kmsan_enter_runtime() in kmsan_vmap_pages_range_noflush()
Date: Wed, 7 May 2025 18:00:09 +0200
Only enter the runtime to call __vmap_pages_range_noflush(), so that error
handling does not skip kmsan_leave_runtime().
This bug was spotted by CONFIG_WARN_CAPABILITY_ANALYSIS=y
Link: https://lkml.kernel.org/r/20250507160012.3311104-2-glider@google.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Marco Elver <elver@google.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/kmsan/shadow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/mm/kmsan/shadow.c~kmsan-fix-usage-of-kmsan_enter_runtime-in-kmsan_vmap_pages_range_noflush
+++ a/mm/kmsan/shadow.c
@@ -247,17 +247,19 @@ int kmsan_vmap_pages_range_noflush(unsig
kmsan_enter_runtime();
mapped = __vmap_pages_range_noflush(shadow_start, shadow_end, prot,
s_pages, page_shift);
+ kmsan_leave_runtime();
if (mapped) {
err = mapped;
goto ret;
}
+ kmsan_enter_runtime();
mapped = __vmap_pages_range_noflush(origin_start, origin_end, prot,
o_pages, page_shift);
+ kmsan_leave_runtime();
if (mapped) {
err = mapped;
goto ret;
}
- kmsan_leave_runtime();
flush_tlb_kernel_range(shadow_start, shadow_end);
flush_tlb_kernel_range(origin_start, origin_end);
flush_cache_vmap(shadow_start, shadow_end);
_
Patches currently in -mm which might be from glider@google.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-05-21 16:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 16:56 [merged mm-stable] kmsan-fix-usage-of-kmsan_enter_runtime-in-kmsan_vmap_pages_range_noflush.patch removed from -mm tree Andrew Morton
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.