[PATCH 2/4] mm: replace pud_write with pud_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 pud_write is must be referencing

[PATCH 2/4] mm: replace pud_write with pud_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 pud_write is must be referencing