Re: [PATCH v19 08/25] x86/mm: Introduce _PAGE_COW

2021-02-08 Thread Yu, Yu-cheng
On 2/5/2021 10:41 AM, Yu, Yu-cheng wrote: On 2/4/2021 12:27 PM, Dave Hansen wrote: On 2/4/21 12:19 PM, Kees Cook wrote: (e) A page where the processor observed a Write=1 PTE, started a write, set Dirty=1, but then observed a Write=0 PTE.  That's possible today, but will not happen o

Re: [PATCH v19 08/25] x86/mm: Introduce _PAGE_COW

2021-02-05 Thread Yu, Yu-cheng
On 2/4/2021 12:19 PM, Kees Cook wrote: On Wed, Feb 03, 2021 at 02:55:30PM -0800, Yu-cheng Yu wrote: There is essentially no room left in the x86 hardware PTEs on some OSes (not Linux). That left the hardware architects looking for a way to represent a new memory type (shadow stack) within the e

Re: [PATCH v19 08/25] x86/mm: Introduce _PAGE_COW

2021-02-05 Thread Yu, Yu-cheng
On 2/4/2021 12:27 PM, Dave Hansen wrote: On 2/4/21 12:19 PM, Kees Cook wrote: (e) A page where the processor observed a Write=1 PTE, started a write, set Dirty=1, but then observed a Write=0 PTE. That's possible today, but will not happen on processors that support shadow stack. What

Re: [PATCH v19 08/25] x86/mm: Introduce _PAGE_COW

2021-02-04 Thread Dave Hansen
On 2/4/21 12:19 PM, Kees Cook wrote: >> (e) A page where the processor observed a Write=1 PTE, started a write, set >> Dirty=1, but then observed a Write=0 PTE. That's possible today, but >> will not happen on processors that support shadow stack. > What happens for "e" with/without CET? I

Re: [PATCH v19 08/25] x86/mm: Introduce _PAGE_COW

2021-02-04 Thread Kees Cook
On Wed, Feb 03, 2021 at 02:55:30PM -0800, Yu-cheng Yu wrote: > There is essentially no room left in the x86 hardware PTEs on some OSes > (not Linux). That left the hardware architects looking for a way to > represent a new memory type (shadow stack) within the existing bits. > They chose to repurp

[PATCH v19 08/25] x86/mm: Introduce _PAGE_COW

2021-02-03 Thread Yu-cheng Yu
There is essentially no room left in the x86 hardware PTEs on some OSes (not Linux). That left the hardware architects looking for a way to represent a new memory type (shadow stack) within the existing bits. They chose to repurpose a lightly-used state: Write=0, Dirty=1. The reason it's lightly