[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 16/20] xen/arm: mm: Protect Xen page-table update with a spinlock
Hello Julien, On 03.05.19 20:19, Julien Grall wrote: TLDR; because xen page-tables are not that often modified after boot. Yet it is still possible to race. At the moment, create_xen_entries() can only modify the VA range 0 - 2GB. In that range, we can modify at runtime the VMAP area. One potential issue is a vmap issued at the same time. While the range allocation is protected by a lock (see vm_alloc), the mapping is not. So it would be possible to end up modifying the page-table at the same. That could blow up if for instance, the second-level entry is invalid as we would need to allocate memory (only one can win that race). I understand the potential race, but still wondering why didn't we see those issues. Maybe we are too lucky. In general, it is a saner approach to try to serialize the modifications in the page-tables. So you can safely read an entry, check it and then update it. Yet, I think we would stick at these locks for now. -- Sincerely, Andrii Anisov. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |