if (level != PG_LEVEL_4K)
set_memory_4k(addr, 1);
}
returntrue;
}
/* Protect the given page and flush TLB. */ staticinlinebool kfence_protect_page(unsignedlong addr, bool protect)
{ unsignedint level;
pte_t *pte = lookup_address(addr, &level);
if (WARN_ON(!pte || level != PG_LEVEL_4K)) returnfalse;
/* * We need to avoid IPIs, as we may get KFENCE allocations or faults * with interrupts disabled. Therefore, the below is best-effort, and * does not flush TLBs on all CPUs. We can tolerate some inaccuracy; * lazy fault handling takes care of faults after the page is PRESENT.
*/
/* * Flush this CPU's TLB, assuming whoever did the allocation/free is * likely to continue running on this CPU.
*/
preempt_disable();
flush_tlb_one_kernel(addr);
preempt_enable(); returntrue;
}
#endif/* !MODULE */
#endif/* _ASM_X86_KFENCE_H */
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
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.