On 06/29/2012 05:20 AM, Adam Hraska wrote:
> Bugs
> ----
> I am afraid traversing the page tables without proper
> locking exposes us to several nasty time-dependent bugs
> if page_mapping_find() is not coded with extreme care.
> A glance at the hash-based as well as tree-base page
> table reveals that we would at a minimum have to insert
> a number of memory barriers into the code (check out
> ht_mapping_insert() and pt_mapping_insert()). Otherwise,
> a TLB miss handler might eg see a new page table level/
> node before it is fully initialized (the compiler or cpu
> may reorder writes and loads). Or have I forgotten to
> consider something?

I added some write_barrier()'s to pt_mapping_insert() in
mainline,825.1.173, to ht_mapping_insert() in mainline,825.1.174, and
some read_barrier()'s to pt_mapping_find() in mainline,825.1.175.

Jakub

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to