[lkml]   [2019]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v8 11/27] x86/mm: Introduce _PAGE_DIRTY_SW

On Aug 13, 2019, at 4:02 PM, Dave Hansen <> wrote:

>> 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?
 \ /
  Last update: 2019-08-14 01:50    [W:0.063 / U:1.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site