Re: [PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-25 Thread Peter Xu
On Fri, Jan 25, 2019 at 09:54:53AM +0200, Mike Rapoport wrote: > On Thu, Jan 24, 2019 at 05:28:48PM +0800, Peter Xu wrote: > > On Thu, Jan 24, 2019 at 09:27:07AM +0200, Mike Rapoport wrote: > > > On Thu, Jan 24, 2019 at 12:56:15PM +0800, Peter Xu wrote: > > > > On Mon, Jan 21, 2019 at 12:42:33PM

Re: [PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-24 Thread Mike Rapoport
On Thu, Jan 24, 2019 at 05:28:48PM +0800, Peter Xu wrote: > On Thu, Jan 24, 2019 at 09:27:07AM +0200, Mike Rapoport wrote: > > On Thu, Jan 24, 2019 at 12:56:15PM +0800, Peter Xu wrote: > > > On Mon, Jan 21, 2019 at 12:42:33PM +0200, Mike Rapoport wrote: > > > > > > [...] > > > > > > > > @@

Re: [PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-24 Thread Peter Xu
On Thu, Jan 24, 2019 at 09:27:07AM +0200, Mike Rapoport wrote: > On Thu, Jan 24, 2019 at 12:56:15PM +0800, Peter Xu wrote: > > On Mon, Jan 21, 2019 at 12:42:33PM +0200, Mike Rapoport wrote: > > > > [...] > > > > > > @@ -1343,7 +1344,7 @@ static int userfaultfd_register(struct > > > >

Re: [PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-23 Thread Mike Rapoport
On Thu, Jan 24, 2019 at 12:56:15PM +0800, Peter Xu wrote: > On Mon, Jan 21, 2019 at 12:42:33PM +0200, Mike Rapoport wrote: > > [...] > > > > @@ -1343,7 +1344,7 @@ static int userfaultfd_register(struct > > > userfaultfd_ctx *ctx, > > > > > > /* check not compatible vmas */ > > >

Re: [PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-23 Thread Peter Xu
On Mon, Jan 21, 2019 at 12:42:33PM +0200, Mike Rapoport wrote: [...] > > @@ -1343,7 +1344,7 @@ static int userfaultfd_register(struct > > userfaultfd_ctx *ctx, > > > > /* check not compatible vmas */ > > ret = -EINVAL; > > - if (!vma_can_userfault(cur)) > > +

Re: [PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-21 Thread Mike Rapoport
On Mon, Jan 21, 2019 at 03:57:05PM +0800, Peter Xu wrote: > From: Andrea Arcangeli > > v1: From: Shaohua Li > > v2: cleanups, remove a branch. > > [peterx writes up the commit message, as below...] > > This patch introduces the new uffd-wp APIs for userspace. > > Firstly, we'll allow to do

[PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-20 Thread Peter Xu
From: Andrea Arcangeli v1: From: Shaohua Li v2: cleanups, remove a branch. [peterx writes up the commit message, as below...] This patch introduces the new uffd-wp APIs for userspace. Firstly, we'll allow to do UFFDIO_REGISTER with write protection tracking using the new