From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: 'Mike Rapoport' <rppt@linux.vnet.ibm.com>,
'Linux-MM' <linux-mm@kvack.org>
Cc: 'Andrea Arcangeli' <aarcange@redhat.com>,
'Andrew Morton' <akpm@linux-foundation.org>,
"'Dr. David Alan Gilbert'" <dgilbert@redhat.com>,
'Mike Kravetz' <mike.kravetz@oracle.com>,
'Pavel Emelyanov' <xemul@virtuozzo.com>,
'LKML' <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/5] userfaultfd: non-cooperative: better tracking for mapping changes
Date: Thu, 26 Jan 2017 13:50:27 +0800 [thread overview]
Message-ID: <008001d27798$1dd18390$59748ab0$@alibaba-inc.com> (raw)
In-Reply-To: <1485265923-20256-1-git-send-email-rppt@linux.vnet.ibm.com>
On January 24, 2017 9:52 PM Mike Rapoport wrote:
> Hi,
>
> These patches try to address issues I've encountered during integration of
> userfaultfd with CRIU.
> Previously added userfaultfd events for fork(), madvise() and mremap()
> unfortunately do not cover all possible changes to a process virtual memory
> layout required for uffd monitor.
> When one or more VMAs is removed from the process mm, the external uffd
> monitor has no way to detect those changes and will attempt to fill the
> removed regions with userfaultfd_copy.
> Another problematic event is the exit() of the process. Here again, the
> external uffd monitor will try to use userfaultfd_copy, although mm owning
> the memory has already gone.
>
> The first patch in the series is a minor cleanup and it's not strictly
> related to the rest of the series.
>
> The patches 2 and 3 below add UFFD_EVENT_UNMAP and UFFD_EVENT_EXIT to allow
> the uffd monitor track changes in the memory layout of a process.
>
> The patches 4 and 5 amend error codes returned by userfaultfd_copy to make
> the uffd monitor able to cope with races that might occur between delivery
> of unmap and exit events and outstanding userfaultfd_copy's.
>
> The patches are agains current -mm tree.
>
> Mike Rapoport (5):
> mm: call vm_munmap in munmap syscall instead of using open coded version
> userfaultfd: non-cooperative: add event for memory unmaps
> userfaultfd: non-cooperative: add event for exit() notification
> userfaultfd: mcopy_atomic: return -ENOENT when no compatible VMA found
> userfaultfd_copy: return -ENOSPC in case mm has gone
>
> arch/tile/mm/elf.c | 2 +-
> arch/x86/entry/vdso/vma.c | 2 +-
> arch/x86/mm/mpx.c | 2 +-
> fs/aio.c | 2 +-
> fs/proc/vmcore.c | 4 +-
> fs/userfaultfd.c | 91 ++++++++++++++++++++++++++++++++++++++++
> include/linux/mm.h | 14 ++++---
> include/linux/userfaultfd_k.h | 25 +++++++++++
> include/uapi/linux/userfaultfd.h | 8 +++-
> ipc/shm.c | 6 +--
> kernel/exit.c | 2 +
> mm/mmap.c | 55 ++++++++++++++----------
> mm/mremap.c | 23 ++++++----
> mm/userfaultfd.c | 42 ++++++++++---------
> mm/util.c | 5 ++-
> 15 files changed, 215 insertions(+), 68 deletions(-)
>
> --
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2017-01-26 5:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 13:51 Mike Rapoport
2017-01-24 13:51 ` [RFC PATCH 1/5] mm: call vm_munmap in munmap syscall instead of using open coded version Mike Rapoport
2017-01-24 13:52 ` [RFC PATCH 2/5] userfaultfd: non-cooperative: add event for memory unmaps Mike Rapoport
2017-01-24 13:52 ` [RFC PATCH 3/5] userfaultfd: non-cooperative: add event for exit() notification Mike Rapoport
2017-01-24 13:52 ` [RFC PATCH 4/5] userfaultfd: mcopy_atomic: return -ENOENT when no compatible VMA found Mike Rapoport
2017-01-24 13:52 ` [RFC PATCH 5/5] userfaultfd_copy: return -ENOSPC in case mm has gone Mike Rapoport
2017-01-26 5:50 ` Hillf Danton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='008001d27798$1dd18390$59748ab0$@alibaba-inc.com' \
--to=hillf.zj@alibaba-inc.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dgilbert@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=rppt@linux.vnet.ibm.com \
--cc=xemul@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox