if (!collect.order) return; while (collect.index) {
page = smallstack_pop(&collect);
smallstack_push(&tmp, &page[0]);
smallstack_push(&tmp, &page[1 << tmp.order]);
}
__memcpy(&collect, &tmp, sizeof(tmp));
}
/* *Memblockisabouttogoaway.Splitthepageblocksleftoverinheld_back[] *andreturn1/3ofthatmemorytothesystem.
*/ staticvoid kmsan_memblock_discard(void)
{ /* *Foreachorder=N: *-pushheld_back[N].shadowand.originto@collect; *-whilethereare>=3elementsin@collect,dogarbagecollection: *-pop3rangesfrom@collect; *-usetwoofthemasshadowandoriginforthethirdone; *-repeat; *-spliteachremainingelementfrom@collectinto2rangesof *order=N-1, *-repeat.
*/
collect.order = MAX_PAGE_ORDER; for (int i = MAX_PAGE_ORDER; i >= 0; i--) { if (held_back[i].shadow)
smallstack_push(&collect, held_back[i].shadow); if (held_back[i].origin)
smallstack_push(&collect, held_back[i].origin);
held_back[i].shadow = NULL;
held_back[i].origin = NULL;
do_collection();
collect_split();
}
}
void __init kmsan_init_runtime(void)
{ /* Assuming current is init_task */
kmsan_internal_task_create(current);
kmsan_memblock_discard();
pr_info("Starting KernelMemorySanitizer\n");
pr_info("ATTENTION: KMSAN is a debugging tool! Do not use it on production machines!\n");
kmsan_enabled = true;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.