Re: [RFC PATCH v2 16/27] mm: Modify can_follow_write_pte/pmd for shadow stack

From: Dave Hansen
Date: Tue Jul 17 2018 - 19:15:14 EST


On 07/17/2018 04:03 PM, Yu-cheng Yu wrote:
> We need to find a way to differentiate "someone can write to this PTE"
> from "the write bit is set in this PTE".

Please think about this:

Should pte_write() tell us whether PTE.W=1, or should it tell us
that *something* can write to the PTE, which would include
PTE.W=0/D=1?