Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164798614
D58574.id183161.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58574.id183161.diff
View Options
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -635,8 +635,7 @@
size_t sz;
int i;
- if ((zone->uz_flags &
- (UMA_ZFLAG_CACHE | UMA_ZONE_SECONDARY | UMA_ZONE_MALLOC)) != 0) {
+ if ((zone->uz_flags & (UMA_ZFLAG_CACHE | UMA_ZONE_SECONDARY)) != 0) {
/*
* Cache zones should not be instrumented by default, as UMA
* does not have enough information to do so correctly.
@@ -645,9 +644,6 @@
*
* Items from secondary zones are initialized by the parent
* zone and thus cannot safely be marked by UMA.
- *
- * malloc zones are handled directly by malloc(9) and friends,
- * since they can provide more precise origin tracking.
*/
return;
}
@@ -662,7 +658,9 @@
sz = zone->uz_size;
if ((zone->uz_flags & UMA_ZONE_PCPU) == 0) {
- kmsan_orig(item, sz, KMSAN_TYPE_UMA, KMSAN_RET_ADDR);
+ /* malloc(9) updates the origin map itself. */
+ if ((zone->uz_flags & UMA_ZONE_MALLOC) == 0)
+ kmsan_orig(item, sz, KMSAN_TYPE_UMA, KMSAN_RET_ADDR);
kmsan_mark(item, sz, KMSAN_STATE_UNINIT);
} else {
pcpu_item = zpcpu_base_to_offset(item);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 2:42 AM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35824192
Default Alt Text
D58574.id183161.diff (1 KB)
Attached To
Mode
D58574: uma: Fix KMSAN integration with malloc zones
Attached
Detach File
Event Timeline
Log In to Comment