[PATCH 4/4] mm: replace pte_write with pte_access_permitted in fault + gup paths

2017-11-10 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pte_write is must be referencing

[PATCH 4/4] mm: replace pte_write with pte_access_permitted in fault + gup paths

2017-11-10 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pte_write is must be referencing