Skip to contentSkip to conversation

kmsan-expose-kmsan_get_metadata.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 29, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kmsan: expose kmsan_get_metadata()
has been removed from the -mm tree. Its filename was
kmsan-expose-kmsan_get_metadata.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: Ilya Leoshkevich <[email protected]>
Subject: kmsan: expose kmsan_get_metadata()
Date: Fri, 21 Jun 2024 13:34:53 +0200

Each s390 CPU has lowcore pages associated with it. Each CPU sees its own lowcore at virtual address 0 through a hardware mechanism called prefixing. Additionally, all lowcores are mapped to non-0 virtual addresses stored in the lowcore_ptr[] array.

When lowcore is accessed through virtual address 0, one needs to resolve metadata for lowcore_ptr[raw_smp_processor_id()].

Expose kmsan_get_metadata() to make it possible to do this from the arch code.

Cc Alexander Gordeev <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc David Rientjes <[email protected]>
Cc Dmitry Vyukov <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Hyeonggon Yoo <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Marco Elver <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Masami Hiramatsu (Google) <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Steven Rostedt (Google) <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Vlastimil Babka <[email protected]>

---

 include/linux/kmsan.h      |    9 +++++++++
 mm/kmsan/instrumentation.c |    1 +
 mm/kmsan/kmsan.h           |    1 -
 3 files changed, 10 insertions(+), 1 deletion(-)
include/linux/kmsan.h renamed from include/linux/kmsan.h~kmsan-expose-kmsan_get_metadata +9 -0
@@ -230,6 +230,15 @@ void kmsan_handle_urb(const struct urb *
  */
 void kmsan_unpoison_entry_regs(const struct pt_regs *regs);
 
+/**
+ * kmsan_get_metadata() - Return a pointer to KMSAN shadow or origins.
+ * @addr:      kernel address.
+ * @is_origin: whether to return origins or shadow.
+ *
+ * Return NULL if metadata cannot be found.
+ */
+void *kmsan_get_metadata(void *addr, bool is_origin);
+
 #else
 
 static inline void kmsan_init_shadow(void)
mm/kmsan/instrumentation.c renamed from mm/kmsan/instrumentation.c~kmsan-expose-kmsan_get_metadata +1 -0
@@ -14,6 +14,7 @@
 
 #include "kmsan.h"
 #include <linux/gfp.h>
+#include <linux/kmsan.h>
 #include <linux/kmsan_string.h>
 #include <linux/mm.h>
 #include <linux/uaccess.h>
mm/kmsan/kmsan.h renamed from mm/kmsan/kmsan.h~kmsan-expose-kmsan_get_metadata +0 -1
@@ -66,7 +66,6 @@ struct shadow_origin_ptr {
 
 struct shadow_origin_ptr kmsan_get_shadow_origin_ptr(void *addr, u64 size,
 						     bool store);
-void *kmsan_get_metadata(void *addr, bool is_origin);
 void __init kmsan_init_alloc_meta_for_range(void *start, void *end);
 
 enum kmsan_bug_reason {

_

Patches currently in -mm which might be from [email protected] are