Re: [PATCH v2 14/26] userfaultfd: wp: handle COW properly for uffd-wp

2019-02-25 Thread Jerome Glisse
On Mon, Feb 25, 2019 at 03:13:36PM +0800, Peter Xu wrote: > On Fri, Feb 22, 2019 at 10:35:09AM -0500, Jerome Glisse wrote: > > On Fri, Feb 22, 2019 at 04:46:03PM +0800, Peter Xu wrote: > > > On Thu, Feb 21, 2019 at 01:04:24PM -0500, Jerome Glisse wrote: > > > > On Tue, Feb 12, 2019 at 10:56:20AM +0

Re: [PATCH v2 14/26] userfaultfd: wp: handle COW properly for uffd-wp

2019-02-24 Thread Peter Xu
On Fri, Feb 22, 2019 at 10:35:09AM -0500, Jerome Glisse wrote: > On Fri, Feb 22, 2019 at 04:46:03PM +0800, Peter Xu wrote: > > On Thu, Feb 21, 2019 at 01:04:24PM -0500, Jerome Glisse wrote: > > > On Tue, Feb 12, 2019 at 10:56:20AM +0800, Peter Xu wrote: > > > > This allows uffd-wp to support write-

Re: [PATCH v2 14/26] userfaultfd: wp: handle COW properly for uffd-wp

2019-02-22 Thread Jerome Glisse
On Fri, Feb 22, 2019 at 04:46:03PM +0800, Peter Xu wrote: > On Thu, Feb 21, 2019 at 01:04:24PM -0500, Jerome Glisse wrote: > > On Tue, Feb 12, 2019 at 10:56:20AM +0800, Peter Xu wrote: > > > This allows uffd-wp to support write-protected pages for COW. [...] > > > diff --git a/mm/mprotect.c b/mm/

Re: [PATCH v2 14/26] userfaultfd: wp: handle COW properly for uffd-wp

2019-02-22 Thread Peter Xu
On Thu, Feb 21, 2019 at 01:04:24PM -0500, Jerome Glisse wrote: > On Tue, Feb 12, 2019 at 10:56:20AM +0800, Peter Xu wrote: > > This allows uffd-wp to support write-protected pages for COW. > > > > For example, the uffd write-protected PTE could also be write-protected > > by other usages like COW

Re: [PATCH v2 14/26] userfaultfd: wp: handle COW properly for uffd-wp

2019-02-21 Thread Jerome Glisse
On Tue, Feb 12, 2019 at 10:56:20AM +0800, Peter Xu wrote: > This allows uffd-wp to support write-protected pages for COW. > > For example, the uffd write-protected PTE could also be write-protected > by other usages like COW or zero pages. When that happens, we can't > simply set the write bit in