Re: [PATCH v24 19/30] mm: Update can_follow_write_pte() for shadow stack

2021-04-09 Thread Kirill A. Shutemov
On Thu, Apr 01, 2021 at 03:10:53PM -0700, Yu-cheng Yu wrote: > Can_follow_write_pte() ensures a read-only page is COWed by checking the > FOLL_COW flag, and uses pte_dirty() to validate the flag is still valid. > > Like a writable data page, a shadow stack page is writable, and becomes > read-only

[PATCH v24 19/30] mm: Update can_follow_write_pte() for shadow stack

2021-04-01 Thread Yu-cheng Yu
Can_follow_write_pte() ensures a read-only page is COWed by checking the FOLL_COW flag, and uses pte_dirty() to validate the flag is still valid. Like a writable data page, a shadow stack page is writable, and becomes read-only during copy-on-write, but it is always dirty. Thus, in the can_follow