On Mon, Oct 20, 2025 at 07:18:18PM +0200, David Hildenbrand wrote:
So in case the page table got reused in the meantime, we should just back off and be fine, right?
The shared page table is mapped with a PUD entry, and we don't check whether the PUD entry changed here.
Could we simply put a PUD check in there sensibly?
A PUD check would only work if we are guaranteed that the page table will not get freed in the meantime, otherwise we might be walking garbage, trying to interpret garbage as PMDs etc.
That would require RCU freeing of page tables, which we are not guaranteed to have IIRC.
Ack. Yeah Suren is working on this :) but don't know when that'll land.
The easiest approach is probably to simply never reuse shared page tables.
If there is consensus on that I can try to see if I can make it fly easily.
That'd be good, I'd like to see that if viable for you to put something forward :)
-- Cheers
David / dhildenb
Cheers, Lorenzo