On 6/20/22 01:08, Hyeonggon Yoo wrote: >> It would, of course, have to be paired with _PAGE_PRESENT checks. This >> works both on the way in and out of the set_memory code. It shouldn't >> clear other bits a PTE with _PAGE_PRESENT|_PAGE_USER and > You mean nothing should not use set_memory code for PTEs with > _PAGE_USER|_PAGE_PRESENT but set_memory can still be used to clear > _PAGE_USER|_PAGE_PRESENT? I don't see a reason why it should be able to clear _PAGE_USER|_PAGE_PRESENT entries either.