Thread (53 messages) 53 messages, 10 authors, 2019-11-08

Re: [PATCH v8 11/27] x86/mm: Introduce _PAGE_DIRTY_SW

From: Andy Lutomirski <luto@amacapital.net>
Date: 2019-08-13 23:49:35
Also in: linux-arch, linux-doc, linux-mm, lkml

On Aug 13, 2019, at 4:02 PM, Dave Hansen [off-list ref] wrote:
quoted
static inline pte_t pte_mkwrite(pte_t pte)
{
+    pte = pte_move_flags(pte, _PAGE_DIRTY_SW, _PAGE_DIRTY_HW);
   return pte_set_flags(pte, _PAGE_RW);
}
It also isn't clear to me why this *must* move bits here.  Its doubly
unclear why you would need to do this on systems when shadow stacks are
compiled in but disabled.
Why is it conditional at all?  ISTM, in x86, RO+dirty has been effectively repurposed. To avoid having extra things that can conditionally break, I think this code should be unconditional. 

That being said, I’m not at all sure that pte_mkwrite on a shadow stack page makes any sense.
<snip>

Same comments for pmds and puds.
Wasn’t Kirill working on a rework if the whole page table system to just have integer page table levels?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help