Page MenuHomeFreeBSD

D43158.diff
No OneTemporary

D43158.diff

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -728,6 +728,18 @@
if (pmap->pm_stage != PM_STAGE1)
return (false);
+#ifdef KMSAN
+ /*
+ * The break-before-make in pmap_update_entry() results in a situation
+ * where a CPU may call into the KMSAN runtime while the entry is
+ * invalid. If the entry is used to map the current thread structure,
+ * then the runtime will attempt to access unmapped memory. Avoid this
+ * by simply disabling superpage promotion for the kernel map.
+ */
+ if (pmap == kernel_pmap)
+ return (false);
+#endif
+
return (superpages_enabled != 0);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 24, 4:10 PM (11 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32082675
Default Alt Text
D43158.diff (672 B)

Event Timeline