aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2017-02-22 18:42:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-22 19:41:28 -0500
commit72f87654c69690ff4721bd9b4a39983f971de9a5 (patch)
tree0e607734e047d2dc7379b186c5c8c57e9276fd8a /include/linux
parentd3aadc8ed4cb447981ecf34f9af71cddc6cf907d (diff)
userfaultfd: non-cooperative: add mremap() event
The event denotes that an area [start:end] moves to different location. Length change isn't reported as "new" addresses, if they appear on the uffd reader side they will not contain any data and the latter can just zeromap them. Waiting for the event ACK is also done outside of mmap sem, as for fork event. Link: http://lkml.kernel.org/r/20161216144821.5183-12-aarcange@redhat.com Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Michael Rapoport <RAPOPORT@il.ibm.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/userfaultfd_k.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h
index 79002bca1f43..7f318a46044b 100644
--- a/include/linux/userfaultfd_k.h
+++ b/include/linux/userfaultfd_k.h
@@ -55,6 +55,12 @@ static inline bool userfaultfd_armed(struct vm_area_struct *vma)
55extern int dup_userfaultfd(struct vm_area_struct *, struct list_head *); 55extern int dup_userfaultfd(struct vm_area_struct *, struct list_head *);
56extern void dup_userfaultfd_complete(struct list_head *); 56extern void dup_userfaultfd_complete(struct list_head *);
57 57
58extern void mremap_userfaultfd_prep(struct vm_area_struct *,
59 struct vm_userfaultfd_ctx *);
60extern void mremap_userfaultfd_complete(struct vm_userfaultfd_ctx,
61 unsigned long from, unsigned long to,
62 unsigned long len);
63
58#else /* CONFIG_USERFAULTFD */ 64#else /* CONFIG_USERFAULTFD */
59 65
60/* mm helpers */ 66/* mm helpers */
@@ -89,6 +95,17 @@ static inline void dup_userfaultfd_complete(struct list_head *l)
89{ 95{
90} 96}
91 97
98static inline void mremap_userfaultfd_prep(struct vm_area_struct *vma,
99 struct vm_userfaultfd_ctx *ctx)
100{
101}
102
103static inline void mremap_userfaultfd_complete(struct vm_userfaultfd_ctx ctx,
104 unsigned long from,
105 unsigned long to,
106 unsigned long len)
107{
108}
92#endif /* CONFIG_USERFAULTFD */ 109#endif /* CONFIG_USERFAULTFD */
93 110
94#endif /* _LINUX_USERFAULTFD_K_H */ 111#endif /* _LINUX_USERFAULTFD_K_H */