Message ID | 20190620022008.19172-1-peterx@redhat.com (mailing list archive) |
---|---|
Headers | show |
Series | userfaultfd: write protection support | expand |
On Wed, Jun 19, 2019 at 7:20 PM Peter Xu <peterx@redhat.com> wrote: > This series implements initial write protection support for > userfaultfd. Currently both shmem and hugetlbfs are not supported > yet, but only anonymous memory. This is the 4nd version of it. > > The latest code can also be found at: > > https://github.com/xzpeter/linux/tree/uffd-wp-merged Hi Peter - I ported the branch you had above on top of v5.4.20 (what I happened to be running locally), and fixed one issue that was causing crashes for me: https://github.com/bpowers/linux/commit/61086b5a0fa4aeb494e86d999926551a4323b84f I wrote a small test program here: https://github.com/plasma-umass/Mesh/blob/master/src/test/userfaultfd-kernel-copy.cc and write protection support for userfaultfd (with eventual shmem support) would be _hugely_ helpful for a userspace memory allocator I'm working on. Is there anything I can do to help get this considered for mainline? We have some time before the 5.7 merge window opens up. Tested-by: Bobby Powers <bobbypowers@gmail.com>
On Mon, Feb 17, 2020 at 07:59:12PM -0800, Bobby Powers wrote: > On Wed, Jun 19, 2019 at 7:20 PM Peter Xu <peterx@redhat.com> wrote: > > This series implements initial write protection support for > > userfaultfd. Currently both shmem and hugetlbfs are not supported > > yet, but only anonymous memory. This is the 4nd version of it. > > > > The latest code can also be found at: > > > > https://github.com/xzpeter/linux/tree/uffd-wp-merged > > Hi Peter - I ported the branch you had above on top of v5.4.20 (what I > happened to be running locally), and fixed one issue that was causing > crashes for me: > https://github.com/bpowers/linux/commit/61086b5a0fa4aeb494e86d999926551a4323b84f Hi, Bobby, Thanks for playing with the branch! Yes, this should be needed if you have 7d0325749a6c ("userfaultfd: untag user pointers", 2019-09-25) in your base branch where the address is replaced by its pointer. > I wrote a small test program here: > https://github.com/plasma-umass/Mesh/blob/master/src/test/userfaultfd-kernel-copy.cc Just FYI that there's some other tests/libraries over there [1,2]. Also the series has the uffd selftest for write-protection as well. > and write protection support for userfaultfd (with eventual shmem > support) would be _hugely_ helpful for a userspace memory allocator > I'm working on. Is there anything I can do to help get this > considered for mainline? We have some time before the 5.7 merge > window opens up. Tested-by: Bobby Powers <bobbypowers@gmail.com> Thanks for the tag! Yes it would be great if we can continue to work on those, but for now let's see whether we can move on what we have first (it's already two series without much certainty on whether it could get merged soon). Considering that we've got quite a few pings again for either the mm retry series and the write-protect work, I'll rebase the two series, test & post soon this week. I'll keep you in the loop. Thanks, [1] https://github.com/LLNL/umap [2] https://github.com/xzpeter/clibs/blob/master/gpl/userspace/uffd-test/uffd-test.c