Home
last modified time | relevance | path

Searched refs:vm_flags (Results 1 – 25 of 307) sorted by relevance

12345678910>>...13

/linux/arch/arm64/include/asm/
A Dmman.h38 static inline pgprot_t arch_vm_get_page_prot(unsigned long vm_flags) in arch_vm_get_page_prot() argument
42 if (vm_flags & VM_ARM64_BTI) in arch_vm_get_page_prot()
55 if (vm_flags & VM_MTE) in arch_vm_get_page_prot()
60 #define arch_vm_get_page_prot(vm_flags) arch_vm_get_page_prot(vm_flags) argument
77 static inline bool arch_validate_flags(unsigned long vm_flags) in arch_validate_flags() argument
83 return !(vm_flags & VM_MTE) || (vm_flags & VM_MTE_ALLOWED); in arch_validate_flags()
85 #define arch_validate_flags(vm_flags) arch_validate_flags(vm_flags) argument
/linux/arch/sparc/include/asm/
A Dmman.h49 #define arch_vm_get_page_prot(vm_flags) sparc_vm_get_page_prot(vm_flags) argument
50 static inline pgprot_t sparc_vm_get_page_prot(unsigned long vm_flags) in sparc_vm_get_page_prot() argument
52 return (vm_flags & VM_SPARC_ADI) ? __pgprot(_PAGE_MCD_4V) : __pgprot(0); in sparc_vm_get_page_prot()
63 #define arch_validate_flags(vm_flags) arch_validate_flags(vm_flags) argument
67 static inline bool arch_validate_flags(unsigned long vm_flags) in arch_validate_flags() argument
73 if (vm_flags & VM_SPARC_ADI) { in arch_validate_flags()
78 if (vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) in arch_validate_flags()
89 if (vm_flags & VM_MERGEABLE) in arch_validate_flags()
/linux/mm/
A Dmmap.c133 unsigned long vm_flags = vma->vm_flags; in vma_set_page_prot() local
138 vm_flags &= ~VM_SHARED; in vma_set_page_prot()
1042 if ((vma->vm_flags ^ vm_flags) & ~VM_SOFTDIRTY) in is_mergeable_vma()
1266 !((a->vm_flags ^ b->vm_flags) & ~(VM_ACCESS_FLAGS | VM_SOFTDIRTY)) && in anon_vma_compatible()
1410 vm_flags_t vm_flags; in do_mmap() local
1669 vm_flags_t vm_flags = vma->vm_flags; in vma_wants_writenotify() local
1774 vma->vm_flags = vm_flags; in mmap_region()
1804 if (unlikely(vm_flags != vma->vm_flags && prev)) { in mmap_region()
1816 vm_flags = vma->vm_flags; in mmap_region()
1821 vm_flags = vma->vm_flags; in mmap_region()
[all …]
A Dmremap.c575 unsigned long vm_flags = vma->vm_flags; in move_vma() local
611 MADV_UNMERGEABLE, &vm_flags); in move_vma()
615 if (vm_flags & VM_ACCOUNT) { in move_vma()
624 if (vm_flags & VM_ACCOUNT) in move_vma()
659 vma->vm_flags &= ~VM_ACCOUNT; in move_vma()
705 if (vm_flags & VM_LOCKED) { in move_vma()
714 vma->vm_flags |= VM_ACCOUNT; in move_vma()
766 if (vma->vm_flags & VM_LOCKED) { in vma_to_resize()
849 if (vma->vm_flags & VM_MAYSHARE) in mremap_to()
1030 if (vma->vm_flags & VM_LOCKED) { in SYSCALL_DEFINE5()
[all …]
A Dnommu.c177 vma->vm_flags |= VM_USERMAP; in __vmalloc_user_flags()
907 unsigned long vm_flags; in determine_vm_flags() local
916 vm_flags |= VM_MAYSHARE; in determine_vm_flags()
923 vm_flags |= VM_SHARED; in determine_vm_flags()
931 vm_flags &= ~VM_MAYSHARE; in determine_vm_flags()
933 return vm_flags; in determine_vm_flags()
1009 region->vm_flags = vma->vm_flags |= VM_MAPPED_COPY; in do_mmap_private()
1067 vm_flags_t vm_flags; in do_mmap() local
1098 region->vm_flags = vm_flags; in do_mmap()
1101 vma->vm_flags = vm_flags; in do_mmap()
[all …]
A Dmlock.c425 vma->vm_flags &= VM_LOCKED_CLEAR_MASK; in munlock_vma_pages_range()
504 vm_flags_t old_flags = vma->vm_flags; in mlock_fixup()
506 if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) || in mlock_fixup()
551 vma->vm_flags = newflags; in mlock_fixup()
583 vm_flags_t newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_vma_lock_flags()
634 if (vma->vm_flags & VM_LOCKED) { in count_mm_mlocked_page_nr()
702 vm_flags_t vm_flags = VM_LOCKED; in SYSCALL_DEFINE3() local
708 vm_flags |= VM_LOCKONFAULT; in SYSCALL_DEFINE3()
710 return do_mlock(start, len, vm_flags); in SYSCALL_DEFINE3()
765 newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_mlockall_flags()
A Dmprotect.c68 if (prot_numa && !(vma->vm_flags & VM_SHARED) && in change_pte_range()
96 if (is_cow_mapping(vma->vm_flags) && in change_pte_range()
137 !(vma->vm_flags & VM_SOFTDIRTY))) { in change_pte_range()
413 unsigned long oldflags = vma->vm_flags; in mprotect_fixup()
431 (vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) && in mprotect_fixup()
470 VM_WARN_ON((vma->vm_flags ^ newflags) & ~VM_SOFTDIRTY); in mprotect_fixup()
493 vma->vm_flags = newflags; in mprotect_fixup()
572 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_mprotect_pkey()
580 if (!(vma->vm_flags & VM_GROWSUP)) in do_mprotect_pkey()
598 if (rier && (vma->vm_flags & VM_MAYEXEC)) in do_mprotect_pkey()
[all …]
A Duserfaultfd.c64 bool writable = dst_vma->vm_flags & VM_WRITE; in mfill_atomic_install_pte()
65 bool vm_shared = dst_vma->vm_flags & VM_SHARED; in mfill_atomic_install_pte()
283 int vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
333 vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
461 if (!(dst_vma->vm_flags & VM_SHARED)) { in mfill_atomic_pte()
537 dst_vma->vm_flags & VM_SHARED)) in __mcopy_atomic()
545 if (wp_copy && !(dst_vma->vm_flags & VM_UFFD_WP)) in __mcopy_atomic()
566 if (!(dst_vma->vm_flags & VM_SHARED) && in __mcopy_atomic()
706 if (!dst_vma || (dst_vma->vm_flags & VM_SHARED)) in mwriteprotect_range()
714 newprot = vm_get_page_prot(dst_vma->vm_flags & ~(VM_WRITE)); in mwriteprotect_range()
[all …]
/linux/include/trace/events/
A Dfs_dax.h18 __field(unsigned long, vm_flags)
31 __entry->vm_flags = vmf->vma->vm_flags;
43 __entry->vm_flags & VM_SHARED ? "shared" : "private",
70 __field(unsigned long, vm_flags)
79 __entry->vm_flags = vmf->vma->vm_flags;
111 __field(unsigned long, vm_flags)
122 __entry->vm_flags = vmf->vma->vm_flags;
158 __field(unsigned long, vm_flags)
168 __entry->vm_flags = vmf->vma->vm_flags;
202 __field(unsigned long, vm_flags)
[all …]
/linux/arch/powerpc/include/asm/
A Dmman.h27 static inline pgprot_t arch_vm_get_page_prot(unsigned long vm_flags) in arch_vm_get_page_prot() argument
30 return (vm_flags & VM_SAO) ? in arch_vm_get_page_prot()
31 __pgprot(_PAGE_SAO | vmflag_to_pte_pkey_bits(vm_flags)) : in arch_vm_get_page_prot()
32 __pgprot(0 | vmflag_to_pte_pkey_bits(vm_flags)); in arch_vm_get_page_prot()
34 return (vm_flags & VM_SAO) ? __pgprot(_PAGE_SAO) : __pgprot(0); in arch_vm_get_page_prot()
37 #define arch_vm_get_page_prot(vm_flags) arch_vm_get_page_prot(vm_flags) argument
/linux/arch/powerpc/include/asm/book3s/64/
A Dhash-pkey.h8 static inline u64 hash__vmflag_to_pte_pkey_bits(u64 vm_flags) in hash__vmflag_to_pte_pkey_bits() argument
10 return (((vm_flags & VM_PKEY_BIT0) ? H_PTE_PKEY_BIT0 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
11 ((vm_flags & VM_PKEY_BIT1) ? H_PTE_PKEY_BIT1 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
12 ((vm_flags & VM_PKEY_BIT2) ? H_PTE_PKEY_BIT2 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
13 ((vm_flags & VM_PKEY_BIT3) ? H_PTE_PKEY_BIT3 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
14 ((vm_flags & VM_PKEY_BIT4) ? H_PTE_PKEY_BIT4 : 0x0UL)); in hash__vmflag_to_pte_pkey_bits()
/linux/arch/x86/include/uapi/asm/
A Dmman.h16 #define arch_vm_get_page_prot(vm_flags) __pgprot( \ argument
17 ((vm_flags) & VM_PKEY_BIT0 ? _PAGE_PKEY_BIT0 : 0) | \
18 ((vm_flags) & VM_PKEY_BIT1 ? _PAGE_PKEY_BIT1 : 0) | \
19 ((vm_flags) & VM_PKEY_BIT2 ? _PAGE_PKEY_BIT2 : 0) | \
20 ((vm_flags) & VM_PKEY_BIT3 ? _PAGE_PKEY_BIT3 : 0))
/linux/include/linux/
A Dkhugepaged.h18 unsigned long vm_flags);
57 unsigned long vm_flags) in khugepaged_enter() argument
62 (khugepaged_req_madv() && (vm_flags & VM_HUGEPAGE))) && in khugepaged_enter()
63 !(vm_flags & VM_NOHUGEPAGE) && in khugepaged_enter()
78 unsigned long vm_flags) in khugepaged_enter() argument
83 unsigned long vm_flags) in khugepaged_enter_vma_merge() argument
A Duserfaultfd_k.h94 return vma->vm_flags & (VM_UFFD_WP | VM_UFFD_MINOR); in uffd_disable_huge_pmd_share()
99 return vma->vm_flags & VM_UFFD_MISSING; in userfaultfd_missing()
104 return vma->vm_flags & VM_UFFD_WP; in userfaultfd_wp()
109 return vma->vm_flags & VM_UFFD_MINOR; in userfaultfd_minor()
126 return vma->vm_flags & __VM_UFFD_FLAGS; in userfaultfd_armed()
A Dhuge_mm.h134 unsigned long vm_flags) in transhuge_vma_enabled() argument
137 if ((vm_flags & VM_NOHUGEPAGE) || in transhuge_vma_enabled()
156 if (!transhuge_vma_enabled(vma, vma->vm_flags)) in __transparent_hugepage_enabled()
170 return !!(vma->vm_flags & VM_HUGEPAGE); in __transparent_hugepage_enabled()
223 int hugepage_madvise(struct vm_area_struct *vma, unsigned long *vm_flags,
359 unsigned long vm_flags) in transhuge_vma_enabled() argument
403 unsigned long *vm_flags, int advice) in hugepage_madvise() argument
/linux/fs/
A Duserfaultfd.c885 vma->vm_flags = new_flags; in userfaultfd_release()
1258 if (vm_flags & VM_UFFD_WP) { in vma_can_userfault()
1297 vm_flags = 0; in userfaultfd_register()
1299 vm_flags |= VM_UFFD_MISSING; in userfaultfd_register()
1304 vm_flags |= VM_UFFD_WP; in userfaultfd_register()
1310 vm_flags |= VM_UFFD_MINOR; in userfaultfd_register()
1387 if ((vm_flags & VM_UFFD_WP) && !(cur->vm_flags & VM_MAYWRITE)) in userfaultfd_register()
1428 (vma->vm_flags & vm_flags) == vm_flags) in userfaultfd_register()
1435 new_flags = (vma->vm_flags & ~__VM_UFFD_FLAGS) | vm_flags; in userfaultfd_register()
1460 vma->vm_flags = new_flags; in userfaultfd_register()
[all …]
/linux/tools/testing/selftests/bpf/progs/
A Dbpf_iter_task_vma.c38 perm_str[0] = (vma->vm_flags & VM_READ) ? 'r' : '-'; in proc_maps()
39 perm_str[1] = (vma->vm_flags & VM_WRITE) ? 'w' : '-'; in proc_maps()
40 perm_str[2] = (vma->vm_flags & VM_EXEC) ? 'x' : '-'; in proc_maps()
41 perm_str[3] = (vma->vm_flags & VM_MAYSHARE) ? 's' : 'p'; in proc_maps()
/linux/arch/nds32/mm/
A Dcacheflush.c34 cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC); in flush_icache_page()
68 (vma->vm_flags & VM_EXEC)) { in update_mmu_cache()
72 cpu_cache_wbinval_page(kaddr, vma->vm_flags & VM_EXEC); in update_mmu_cache()
139 if (vma->vm_flags & VM_EXEC) in flush_cache_range()
146 cpu_cache_wbinval_page(start, vma->vm_flags & VM_EXEC); in flush_cache_range()
160 cpu_cache_wbinval_page(vto, vma->vm_flags & VM_EXEC); in flush_cache_page()
274 if (vma->vm_flags & VM_EXEC) { in copy_to_user_page()
310 if (vma->vm_flags & VM_EXEC) in flush_anon_page()
/linux/arch/hexagon/mm/
A Dvm_fault.c68 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_page_fault()
80 if (!(vma->vm_flags & VM_EXEC)) in do_page_fault()
84 if (!(vma->vm_flags & VM_READ)) in do_page_fault()
88 if (!(vma->vm_flags & VM_WRITE)) in do_page_fault()
/linux/arch/nios2/mm/
A Dcacheflush.c88 if (!(mpnt->vm_flags & VM_MAYSHARE)) in flush_aliases()
137 if (vma == NULL || (vma->vm_flags & VM_EXEC)) in flush_cache_range()
157 if (vma->vm_flags & VM_EXEC) in flush_cache_page()
229 if (vma->vm_flags & VM_EXEC) in update_mmu_cache()
260 if (vma->vm_flags & VM_EXEC) in copy_from_user_page()
271 if (vma->vm_flags & VM_EXEC) in copy_to_user_page()
A Dfault.c101 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_page_fault()
118 if (!(vma->vm_flags & VM_EXEC)) in do_page_fault()
122 if (!(vma->vm_flags & VM_READ)) in do_page_fault()
126 if (!(vma->vm_flags & VM_WRITE)) in do_page_fault()
/linux/arch/arm64/mm/
A Dfault.c474 unsigned int mm_flags, unsigned long vm_flags, in __do_page_fault() argument
487 if (!(vma->vm_flags & VM_GROWSDOWN)) in __do_page_fault()
497 if (!(vma->vm_flags & vm_flags)) in __do_page_fault()
522 unsigned long vm_flags; in do_page_fault() local
547 vm_flags = VM_EXEC; in do_page_fault()
551 vm_flags = VM_WRITE; in do_page_fault()
555 vm_flags = VM_READ; in do_page_fault()
557 vm_flags |= VM_WRITE; in do_page_fault()
560 vm_flags |= VM_EXEC; in do_page_fault()
599 fault = __do_page_fault(mm, addr, mm_flags, vm_flags, regs); in do_page_fault()
[all …]
/linux/arch/sparc/mm/
A Dfault_32.c159 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_sparc_fault()
170 if (!(vma->vm_flags & VM_WRITE)) in do_sparc_fault()
174 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) in do_sparc_fault()
325 if (!(vma->vm_flags & VM_GROWSDOWN)) in force_user_fault()
332 if (!(vma->vm_flags & VM_WRITE)) in force_user_fault()
336 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) in force_user_fault()
/linux/arch/alpha/mm/
A Dfault.c128 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_page_fault()
138 if (!(vma->vm_flags & VM_EXEC)) in do_page_fault()
142 if (!(vma->vm_flags & (VM_READ | VM_WRITE))) in do_page_fault()
145 if (!(vma->vm_flags & VM_WRITE)) in do_page_fault()
/linux/arch/ia64/mm/
A Dfault.c126 if (((isr >> IA64_ISR_R_BIT) & 1UL) && (!(vma->vm_flags & (VM_READ | VM_WRITE)))) in ia64_do_page_fault()
129 if ((vma->vm_flags & mask) != mask) in ia64_do_page_fault()
176 if (!(prev_vma && (prev_vma->vm_flags & VM_GROWSUP) && (address == prev_vma->vm_end))) { in ia64_do_page_fault()
179 if (!(vma->vm_flags & VM_GROWSDOWN)) in ia64_do_page_fault()

Completed in 39 milliseconds

12345678910>>...13