/mm/ |
D | mmap.c | 96 pgprot_t vm_get_page_prot(unsigned long vm_flags) in vm_get_page_prot() argument 98 return __pgprot(pgprot_val(protection_map[vm_flags & in vm_get_page_prot() 100 pgprot_val(arch_vm_get_page_prot(vm_flags))); in vm_get_page_prot() 104 static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags) in vm_pgprot_modify() argument 106 return pgprot_modify(oldprot, vm_get_page_prot(vm_flags)); in vm_pgprot_modify() 112 unsigned long vm_flags = vma->vm_flags; in vma_set_page_prot() local 114 vma->vm_page_prot = vm_pgprot_modify(vma->vm_page_prot, vm_flags); in vma_set_page_prot() 116 vm_flags &= ~VM_SHARED; in vma_set_page_prot() 118 vm_flags); in vma_set_page_prot() 252 if (vma->vm_flags & VM_DENYWRITE) in __remove_shared_vm_struct() [all …]
|
D | fremap.c | 150 vm_flags_t vm_flags = 0; in SYSCALL_DEFINE5() local 188 if (!vma || !(vma->vm_flags & VM_SHARED)) in SYSCALL_DEFINE5() 198 if (!(vma->vm_flags & VM_NONLINEAR)) { in SYSCALL_DEFINE5() 229 vm_flags = vma->vm_flags; in SYSCALL_DEFINE5() 231 addr = mmap_region(file, start, size, vm_flags, pgoff); in SYSCALL_DEFINE5() 243 vma->vm_flags |= VM_NONLINEAR; in SYSCALL_DEFINE5() 250 if (vma->vm_flags & VM_LOCKED) { in SYSCALL_DEFINE5() 256 vm_flags = vma->vm_flags; in SYSCALL_DEFINE5() 258 vma->vm_flags = vm_flags; in SYSCALL_DEFINE5() 273 vm_flags = vma->vm_flags; in SYSCALL_DEFINE5() [all …]
|
D | nommu.c | 155 unsigned long vm_flags; in __get_user_pages() local 161 vm_flags = (foll_flags & FOLL_WRITE) ? in __get_user_pages() 163 vm_flags &= (foll_flags & FOLL_FORCE) ? in __get_user_pages() 172 if ((vma->vm_flags & (VM_IO | VM_PFNMAP)) || in __get_user_pages() 173 !(vm_flags & vma->vm_flags)) in __get_user_pages() 229 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) in follow_pfn() 267 vma->vm_flags |= VM_USERMAP; in vmalloc_user() 665 if (region->vm_flags & VM_MAPPED_COPY) { in __put_nommu_region() 719 protect_vma(vma, vma->vm_flags); in add_vma_to_mm() 1093 unsigned long vm_flags; in determine_vm_flags() local [all …]
|
D | mremap.c | 243 unsigned long vm_flags = vma->vm_flags; in move_vma() local 267 MADV_UNMERGEABLE, &vm_flags); in move_vma() 294 if (vm_flags & VM_ACCOUNT) { in move_vma() 295 vma->vm_flags &= ~VM_ACCOUNT; in move_vma() 312 vm_stat_account(mm, vma->vm_flags, vma->vm_file, new_len>>PAGE_SHIFT); in move_vma() 323 vma->vm_flags |= VM_ACCOUNT; in move_vma() 325 vma->vm_next->vm_flags |= VM_ACCOUNT; in move_vma() 328 if (vm_flags & VM_LOCKED) { in move_vma() 356 if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP)) in vma_to_resize() 364 if (vma->vm_flags & VM_LOCKED) { in vma_to_resize() [all …]
|
D | gup.c | 105 if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) { in follow_page_pte() 179 if (pud_huge(*pud) && vma->vm_flags & VM_HUGETLB) { in follow_page_mask() 191 if (pmd_huge(*pmd) && vma->vm_flags & VM_HUGETLB) { in follow_page_mask() 322 if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE)) in faultin_page() 329 vm_flags_t vm_flags = vma->vm_flags; in check_vma_flags() local 331 if (vm_flags & (VM_IO | VM_PFNMAP)) in check_vma_flags() 335 if (!(vm_flags & VM_WRITE)) { in check_vma_flags() 347 if (!is_cow_mapping(vm_flags)) { in check_vma_flags() 348 WARN_ON_ONCE(vm_flags & VM_MAYWRITE); in check_vma_flags() 352 } else if (!(vm_flags & VM_READ)) { in check_vma_flags() [all …]
|
D | mprotect.c | 91 !(vma->vm_flags & VM_SOFTDIRTY))) in change_pte_range() 259 unsigned long oldflags = vma->vm_flags; in mprotect_fixup() 318 vma->vm_flags = newflags; in mprotect_fixup() 338 unsigned long vm_flags, nstart, end, tmp, reqprot; in SYSCALL_DEFINE3() local 364 vm_flags = calc_vm_prot_bits(prot); in SYSCALL_DEFINE3() 378 if (!(vma->vm_flags & VM_GROWSDOWN)) in SYSCALL_DEFINE3() 386 if (!(vma->vm_flags & VM_GROWSUP)) in SYSCALL_DEFINE3() 398 newflags = vm_flags; in SYSCALL_DEFINE3() 399 newflags |= (vma->vm_flags & ~(VM_READ | VM_WRITE | VM_EXEC)); in SYSCALL_DEFINE3()
|
D | rmap.c | 600 } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { in page_address_in_vma() 717 unsigned long vm_flags; member 743 if (vma->vm_flags & VM_LOCKED) { in page_referenced_one() 745 pra->vm_flags |= VM_LOCKED; in page_referenced_one() 764 if (vma->vm_flags & VM_LOCKED) { in page_referenced_one() 766 pra->vm_flags |= VM_LOCKED; in page_referenced_one() 778 if (likely(!(vma->vm_flags & VM_SEQ_READ))) in page_referenced_one() 786 pra->vm_flags |= vma->vm_flags; in page_referenced_one() 820 unsigned long *vm_flags) in page_referenced() argument 834 *vm_flags = 0; in page_referenced() [all …]
|
D | memory.c | 687 (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); in print_bad_pte() 756 if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) in vm_normal_page() 765 if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) { in vm_normal_page() 766 if (vma->vm_flags & VM_MIXEDMAP) { in vm_normal_page() 775 if (!is_cow_mapping(vma->vm_flags)) in vm_normal_page() 807 unsigned long vm_flags = vma->vm_flags; in copy_one_pte() local 838 is_cow_mapping(vm_flags)) { in copy_one_pte() 858 if (is_cow_mapping(vm_flags)) { in copy_one_pte() 867 if (vm_flags & VM_SHARED) in copy_one_pte() 1022 if (!(vma->vm_flags & (VM_HUGETLB | VM_NONLINEAR | in copy_page_range() [all …]
|
D | madvise.c | 52 unsigned long new_flags = vma->vm_flags; in madvise_behavior() 68 if (vma->vm_flags & VM_IO) { in madvise_behavior() 98 if (new_flags == vma->vm_flags) { in madvise_behavior() 130 vma->vm_flags = new_flags; in madvise_behavior() 278 if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP)) in madvise_dontneed() 281 if (unlikely(vma->vm_flags & VM_NONLINEAR)) { in madvise_dontneed() 306 if (vma->vm_flags & (VM_LOCKED|VM_NONLINEAR|VM_HUGETLB)) in madvise_remove() 315 if ((vma->vm_flags & (VM_SHARED|VM_WRITE)) != (VM_SHARED|VM_WRITE)) in madvise_remove()
|
D | mlock.c | 246 if ((vma->vm_flags & (VM_WRITE | VM_SHARED)) == VM_WRITE) in __mlock_vma_pages_range() 253 if (vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)) in __mlock_vma_pages_range() 482 vma->vm_flags &= ~VM_LOCKED; in munlock_vma_pages_range() 564 if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) || in mlock_fixup() 605 vma->vm_flags = newflags; in mlock_fixup() 640 newflags = vma->vm_flags & ~VM_LOCKED; in do_mlock() 702 if (vma->vm_flags & (VM_IO | VM_PFNMAP)) in __mm_populate() 788 newflags = vma->vm_flags & ~VM_LOCKED; in do_mlockall()
|
D | msync.c | 76 (vma->vm_flags & VM_LOCKED)) { in SYSCALL_DEFINE3() 86 (vma->vm_flags & VM_SHARED)) { in SYSCALL_DEFINE3() 89 if (vma->vm_flags & VM_NONLINEAR) in SYSCALL_DEFINE3()
|
D | hugetlb.c | 438 if (vma->vm_flags & VM_MAYSHARE) { in vma_resv_map() 453 VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma); in set_vma_resv_map() 462 VM_BUG_ON_VMA(vma->vm_flags & VM_MAYSHARE, vma); in set_vma_resv_flags() 478 if (!(vma->vm_flags & VM_MAYSHARE)) in reset_vma_resv_huge_pages() 485 if (vma->vm_flags & VM_NORESERVE) { in vma_has_reserves() 495 if (vma->vm_flags & VM_MAYSHARE && chg == 0) in vma_has_reserves() 502 if (vma->vm_flags & VM_MAYSHARE) in vma_has_reserves() 1371 if (vma->vm_flags & VM_MAYSHARE) in vma_needs_reservation() 2589 cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE; in copy_hugetlb_page_range() 2763 vma->vm_flags &= ~VM_MAYSHARE; in __unmap_hugepage_range_final() [all …]
|
D | huge_memory.c | 700 if (likely(vma->vm_flags & VM_WRITE)) in maybe_pmd_mkwrite() 806 if (unlikely(khugepaged_enter(vma, vma->vm_flags))) in do_huge_pmd_anonymous_page() 1250 if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) { in follow_trans_huge_pmd() 1471 (new_vma->vm_flags & VM_NOHUGEPAGE)) in move_huge_pmd() 1959 unsigned long *vm_flags, int advice) in hugepage_madvise() argument 1975 if (*vm_flags & (VM_HUGEPAGE | VM_NO_THP)) in hugepage_madvise() 1977 *vm_flags &= ~VM_NOHUGEPAGE; in hugepage_madvise() 1978 *vm_flags |= VM_HUGEPAGE; in hugepage_madvise() 1984 if (unlikely(khugepaged_enter_vma_merge(vma, *vm_flags))) in hugepage_madvise() 1991 if (*vm_flags & (VM_NOHUGEPAGE | VM_NO_THP)) in hugepage_madvise() [all …]
|
D | ksm.c | 421 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in find_mergeable_vma() 787 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in unmerge_and_remove_all_rmap_items() 1025 if (!(vma->vm_flags & VM_MERGEABLE)) in try_to_merge_one_page() 1062 if ((vma->vm_flags & VM_LOCKED) && kpage && !err) { in try_to_merge_one_page() 1608 if (!(vma->vm_flags & VM_MERGEABLE)) in scan_get_next_rmap_item() 1740 unsigned long end, int advice, unsigned long *vm_flags) in ksm_madvise() argument 1750 if (*vm_flags & (VM_MERGEABLE | VM_SHARED | VM_MAYSHARE | in ksm_madvise() 1756 if (*vm_flags & VM_SAO) in ksm_madvise() 1766 *vm_flags |= VM_MERGEABLE; in ksm_madvise() 1770 if (!(*vm_flags & VM_MERGEABLE)) in ksm_madvise() [all …]
|
D | filemap_xip.c | 247 if ((vma->vm_flags & (VM_WRITE | VM_MAYWRITE)) && in xip_file_fault() 248 (vma->vm_flags & (VM_SHARED | VM_MAYSHARE)) && in xip_file_fault() 318 vma->vm_flags |= VM_MIXEDMAP; in xip_file_mmap()
|
D | vmscan.c | 762 unsigned long vm_flags; in page_check_references() local 765 &vm_flags); in page_check_references() 772 if (vm_flags & VM_LOCKED) in page_check_references() 800 if (vm_flags & VM_EXEC) in page_check_references() 1721 unsigned long vm_flags; in shrink_active_list() local 1772 &vm_flags)) { in shrink_active_list() 1783 if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) { in shrink_active_list()
|
D | filemap.c | 1788 if (vma->vm_flags & VM_RAND_READ) in do_sync_mmap_readahead() 1793 if (vma->vm_flags & VM_SEQ_READ) { in do_sync_mmap_readahead() 1833 if (vma->vm_flags & VM_RAND_READ) in do_async_mmap_readahead() 2111 if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) in generic_file_readonly_mmap()
|
D | debug.c | 163 dump_flags(vma->vm_flags, vmaflags_names, ARRAY_SIZE(vmaflags_names)); in dump_vma()
|
D | pagewalk.c | 201 (vma->vm_flags & VM_PFNMAP)) { in walk_page_range()
|
D | swap.c | 705 if (likely((vma->vm_flags & (VM_LOCKED | VM_SPECIAL)) != VM_LOCKED)) { in lru_cache_add_active_or_unevictable()
|
D | mempolicy.c | 685 if (vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)) in queue_pages_range() 771 prev = vma_merge(mm, prev, vmstart, vmend, vma->vm_flags, in mbind_range()
|
D | migrate.c | 1723 (vma->vm_flags & VM_EXEC)) in migrate_misplaced_page()
|
D | vmalloc.c | 2158 vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; in remap_vmalloc_range_partial()
|
D | shmem.c | 3426 file = shmem_file_setup("dev/zero", size, vma->vm_flags); in shmem_zero_setup()
|