Re: [PATCH 02/16] mm: Prepare for FAULT_FLAG_SPECULATIVE

2017-08-09 Thread Laurent Dufour
On 09/08/2017 12:08, Kirill A. Shutemov wrote: > On Tue, Aug 08, 2017 at 04:35:35PM +0200, Laurent Dufour wrote: >> @@ -2295,7 +2302,11 @@ static int wp_page_copy(struct vm_fault *vmf) >> /* >> * Re-check the pte - we dropped the lock >> */ >> -vmf->pte =

Re: [PATCH 02/16] mm: Prepare for FAULT_FLAG_SPECULATIVE

2017-08-09 Thread Kirill A. Shutemov
On Tue, Aug 08, 2017 at 04:35:35PM +0200, Laurent Dufour wrote: > @@ -2295,7 +2302,11 @@ static int wp_page_copy(struct vm_fault *vmf) > /* >* Re-check the pte - we dropped the lock >*/ > - vmf->pte = pte_offset_map_lock(mm, vmf->pmd, vmf->address, >ptl); > + if

[PATCH 02/16] mm: Prepare for FAULT_FLAG_SPECULATIVE

2017-08-08 Thread Laurent Dufour
From: Peter Zijlstra When speculating faults (without holding mmap_sem) we need to validate that the vma against which we loaded pages is still valid when we're ready to install the new PTE. Therefore, replace the pte_offset_map_lock() calls that (re)take the PTL with