Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-08 Thread Laurent Dufour
On 08/02/2018 16:00, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 03:35:58PM +0100, Laurent Dufour wrote: >> I reviewed that part of code, and I think I could now change the way >> pte_unmap_safe() is checking for the pte's value. Since we now have all the >> needed details in the vm_fault

Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-08 Thread Laurent Dufour
On 08/02/2018 16:00, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 03:35:58PM +0100, Laurent Dufour wrote: >> I reviewed that part of code, and I think I could now change the way >> pte_unmap_safe() is checking for the pte's value. Since we now have all the >> needed details in the vm_fault

Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 03:35:58PM +0100, Laurent Dufour wrote: > I reviewed that part of code, and I think I could now change the way > pte_unmap_safe() is checking for the pte's value. Since we now have all the > needed details in the vm_fault structure, I will pass it to > pte_unamp_same() and

Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 03:35:58PM +0100, Laurent Dufour wrote: > I reviewed that part of code, and I think I could now change the way > pte_unmap_safe() is checking for the pte's value. Since we now have all the > needed details in the vm_fault structure, I will pass it to > pte_unamp_same() and

Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-08 Thread Laurent Dufour
On 06/02/2018 21:28, Matthew Wilcox wrote: > On Tue, Feb 06, 2018 at 05:49:50PM +0100, Laurent Dufour wrote: >> From: Peter Zijlstra >> >> One of the side effects of speculating on faults (without holding >> mmap_sem) is that we can race with free_pgtables() and therefore we

Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-08 Thread Laurent Dufour
On 06/02/2018 21:28, Matthew Wilcox wrote: > On Tue, Feb 06, 2018 at 05:49:50PM +0100, Laurent Dufour wrote: >> From: Peter Zijlstra >> >> One of the side effects of speculating on faults (without holding >> mmap_sem) is that we can race with free_pgtables() and therefore we >> cannot assume the

Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-06 Thread Matthew Wilcox
On Tue, Feb 06, 2018 at 05:49:50PM +0100, Laurent Dufour wrote: > From: Peter Zijlstra > > One of the side effects of speculating on faults (without holding > mmap_sem) is that we can race with free_pgtables() and therefore we > cannot assume the page-tables will stick

Re: [PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-06 Thread Matthew Wilcox
On Tue, Feb 06, 2018 at 05:49:50PM +0100, Laurent Dufour wrote: > From: Peter Zijlstra > > One of the side effects of speculating on faults (without holding > mmap_sem) is that we can race with free_pgtables() and therefore we > cannot assume the page-tables will stick around. > > Remove the

[PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-06 Thread Laurent Dufour
From: Peter Zijlstra One of the side effects of speculating on faults (without holding mmap_sem) is that we can race with free_pgtables() and therefore we cannot assume the page-tables will stick around. Remove the reliance on the pte pointer. Signed-off-by: Peter

[PATCH v7 04/24] mm: Dont assume page-table invariance during faults

2018-02-06 Thread Laurent Dufour
From: Peter Zijlstra One of the side effects of speculating on faults (without holding mmap_sem) is that we can race with free_pgtables() and therefore we cannot assume the page-tables will stick around. Remove the reliance on the pte pointer. Signed-off-by: Peter Zijlstra (Intel) In most of