Re: [PATCH v19 12/25] mm: Introduce VM_SHSTK for shadow stack memory

2021-02-04 Thread Yu, Yu-cheng
On 2/4/2021 12:46 PM, Cyrill Gorcunov wrote: On Wed, Feb 03, 2021 at 02:55:34PM -0800, Yu-cheng Yu wrote: diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 602e3a52884d..59623dcd92bb 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -661,6 +661,9 @@ static void show_smap_vm

Re: [PATCH v19 12/25] mm: Introduce VM_SHSTK for shadow stack memory

2021-02-04 Thread Cyrill Gorcunov
On Wed, Feb 03, 2021 at 02:55:34PM -0800, Yu-cheng Yu wrote: > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 602e3a52884d..59623dcd92bb 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -661,6 +661,9 @@ static void show_smap_vma_flags(struct seq_file *m, > struct

[PATCH v19 12/25] mm: Introduce VM_SHSTK for shadow stack memory

2021-02-03 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