Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | From | Andrea Arcangeli <> | Subject | [PATCH 21/21] userfaultfd: add userfaultfd_wp mm helpers | Date | Thu, 5 Mar 2015 18:18:04 +0100 |
| |
These helpers will be used to know if to call handle_userfault() during wrprotect faults in order to deliver the wrprotect faults to userland.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> --- include/linux/userfaultfd_k.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h index 3c39a4f..81f0d11 100644 --- a/include/linux/userfaultfd_k.h +++ b/include/linux/userfaultfd_k.h @@ -65,6 +65,11 @@ static inline bool userfaultfd_missing(struct vm_area_struct *vma) return vma->vm_flags & VM_UFFD_MISSING; } +static inline bool userfaultfd_wp(struct vm_area_struct *vma) +{ + return vma->vm_flags & VM_UFFD_WP; +} + static inline bool userfaultfd_armed(struct vm_area_struct *vma) { return vma->vm_flags & (VM_UFFD_MISSING | VM_UFFD_WP); @@ -92,6 +97,11 @@ static inline bool userfaultfd_missing(struct vm_area_struct *vma) return false; } +static inline bool userfaultfd_wp(struct vm_area_struct *vma) +{ + return false; +} + static inline bool userfaultfd_armed(struct vm_area_struct *vma) { return false;
| ![\](/images/icornerr.gif) |