On Mon, Jan 18, 2021 at 03:40:13PM -0400, Jason Gunthorpe wrote: > Does the stuff in hmm.c need updating too? > > if (!pte_present(pte)) { > swp_entry_t entry = pte_to_swp_entry(pte); This idea should be cross-tree, so yes.. even if I'm not 100% sure whether HMM would be a good candidate for file-backed uffd-wp, I agree we should also take care of those. I guess I managed to take care of all the is_swap_pte() callers but forget I should also look for pte_to_swp_entry() users too, since sometimes pte_none() and pte_present() is checked separately, so there're quite a few places that I should have taken care of but got lost. HMM is one of them. Thanks for spotting this, Jason. I'll coordinate in the next version. -- Peter Xu