userfaultfd_k.h (a23e1966932464e1c5226cb9ac4ce1d5fc10ba22) userfaultfd_k.h (9651fcedf7b92d3f7f1ab179e8ab55b85ee10fc1)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * include/linux/userfaultfd_k.h
4 *
5 * Copyright (C) 2015 Red Hat, Inc.
6 *
7 */
8

--- 204 unchanged lines hidden (view full) ---

213}
214
215static inline bool vma_can_userfault(struct vm_area_struct *vma,
216 unsigned long vm_flags,
217 bool wp_async)
218{
219 vm_flags &= __VM_UFFD_FLAGS;
220
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * include/linux/userfaultfd_k.h
4 *
5 * Copyright (C) 2015 Red Hat, Inc.
6 *
7 */
8

--- 204 unchanged lines hidden (view full) ---

213}
214
215static inline bool vma_can_userfault(struct vm_area_struct *vma,
216 unsigned long vm_flags,
217 bool wp_async)
218{
219 vm_flags &= __VM_UFFD_FLAGS;
220
221 if (vm_flags & VM_DROPPABLE)
222 return false;
223
221 if ((vm_flags & VM_UFFD_MINOR) &&
222 (!is_vm_hugetlb_page(vma) && !vma_is_shmem(vma)))
223 return false;
224
225 /*
226 * If wp async enabled, and WP is the only mode enabled, allow any
227 * memory type.
228 */

--- 214 unchanged lines hidden ---
224 if ((vm_flags & VM_UFFD_MINOR) &&
225 (!is_vm_hugetlb_page(vma) && !vma_is_shmem(vma)))
226 return false;
227
228 /*
229 * If wp async enabled, and WP is the only mode enabled, allow any
230 * memory type.
231 */

--- 214 unchanged lines hidden ---