Re: [PATCH 14/35] mm: Introduce VM_SHADOW_STACK for shadow stack memory

From: Dave Hansen
Date: Wed Feb 09 2022 - 16:56:08 EST


On 1/30/22 13:18, Rick Edgecombe wrote:
> A shadow stack PTE must be read-only and have _PAGE_DIRTY set. However,
> read-only and Dirty PTEs also exist for copy-on-write (COW) pages. These
> two cases are handled differently for page faults. Introduce
> VM_SHADOW_STACK to track shadow stack VMAs.

This is also a very appropriate place to remind folks that VM_WRITE is
mutually exclusive with this flag. That's pretty important.