Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153778872
D43158.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
672 B
Referenced Files
None
Subscribers
None
D43158.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D43158: arm64: Disable kernel superpage promotion when KMSAN is configured
Attached
Detach File
Event Timeline
Log In to Comment