[PATCH v14 12/26] mm: Introduce VM_SHSTK for shadow stack memory

2020-10-12 Thread Yu-cheng Yu
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_SHSTK to track shadow stack VMAs. Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook

[PATCH v14 12/26] mm: Introduce VM_SHSTK for shadow stack memory

2020-10-09 Thread Yu-cheng Yu
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_SHSTK to track shadow stack VMAs. Signed-off-by: Yu-cheng Yu Reviewed-by: Kees Cook