Home
last modified time | relevance | path

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

12345678910>>...13

/linux-6.1.9/include/trace/events/
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;
89 __entry->vm_flags & VM_SHARED ? "shared" : "private",
111 __field(unsigned long, vm_flags)
122 __entry->vm_flags = vmf->vma->vm_flags;
134 __entry->vm_flags & VM_SHARED ? "shared" : "private",
158 __field(unsigned long, vm_flags)
[all …]
/linux-6.1.9/mm/
Dmmap.c83 static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags) in vm_pgprot_modify() argument
85 return pgprot_modify(oldprot, vm_get_page_prot(vm_flags)); in vm_pgprot_modify()
91 unsigned long vm_flags = vma->vm_flags; in vma_set_page_prot() local
94 vm_page_prot = vm_pgprot_modify(vma->vm_page_prot, vm_flags); in vma_set_page_prot()
96 vm_flags &= ~VM_SHARED; in vma_set_page_prot()
97 vm_page_prot = vm_pgprot_modify(vm_page_prot, vm_flags); in vma_set_page_prot()
109 if (vma->vm_flags & VM_SHARED) in __remove_shared_vm_struct()
412 if (vma->vm_flags & VM_SHARED) in __vma_link_file()
867 struct file *file, unsigned long vm_flags, in is_mergeable_vma() argument
879 if ((vma->vm_flags ^ vm_flags) & ~VM_SOFTDIRTY) in is_mergeable_vma()
[all …]
Dmremap.c580 unsigned long vm_flags = vma->vm_flags; in move_vma() local
616 MADV_UNMERGEABLE, &vm_flags); in move_vma()
620 if (vm_flags & VM_ACCOUNT) { in move_vma()
629 if (vm_flags & VM_ACCOUNT) in move_vma()
663 if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNMAP)) { in move_vma()
664 vma->vm_flags &= ~VM_ACCOUNT; in move_vma()
681 vm_stat_account(mm, vma->vm_flags, new_len >> PAGE_SHIFT); in move_vma()
684 if (unlikely(vma->vm_flags & VM_PFNMAP)) in move_vma()
689 vma->vm_flags &= VM_LOCKED_CLEAR_MASK; in move_vma()
705 if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNMAP)) in move_vma()
[all …]
Dnommu.c125 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) in follow_pfn()
153 pgprot_t prot, unsigned long vm_flags, int node, in __vmalloc_node_range() argument
176 vma->vm_flags |= VM_USERMAP; in __vmalloc_user_flags()
530 if (region->vm_flags & VM_MAPPED_COPY) in __put_nommu_region()
892 unsigned long vm_flags; in determine_vm_flags() local
894 vm_flags = calc_vm_prot_bits(prot, 0) | calc_vm_flag_bits(flags); in determine_vm_flags()
899 vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; in determine_vm_flags()
901 vm_flags |= VM_MAYSHARE; in determine_vm_flags()
906 vm_flags |= VM_MAYSHARE | (capabilities & NOMMU_VMFLAGS); in determine_vm_flags()
908 vm_flags |= VM_SHARED; in determine_vm_flags()
[all …]
Dmprotect.c47 VM_BUG_ON(!(vma->vm_flags & VM_WRITE) || pte_write(pte)); in can_change_pte_writable()
60 if (!(vma->vm_flags & VM_SHARED)) { in can_change_pte_writable()
106 if (prot_numa && !(vma->vm_flags & VM_SHARED) && in change_pte_range()
136 if (is_cow_mapping(vma->vm_flags) && in change_pte_range()
553 unsigned long oldflags = vma->vm_flags; in mprotect_fixup()
571 (vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) && in mprotect_fixup()
610 VM_WARN_ON((vma->vm_flags ^ newflags) & ~VM_SOFTDIRTY); in mprotect_fixup()
633 vma->vm_flags = newflags; in mprotect_fixup()
640 if (vma->vm_flags & VM_SHARED) in mprotect_fixup()
643 try_change_writable = !!(vma->vm_flags & VM_WRITE); in mprotect_fixup()
[all …]
Dmlock.c324 if (vma->vm_flags & VM_LOCKED) in mlock_pte_range()
340 if (vma->vm_flags & VM_LOCKED) in mlock_pte_range()
383 WRITE_ONCE(vma->vm_flags, newflags); in mlock_vma_pages_range()
391 WRITE_ONCE(vma->vm_flags, newflags); in mlock_vma_pages_range()
411 vm_flags_t oldflags = vma->vm_flags; in mlock_fixup()
459 vma->vm_flags = newflags; in mlock_fixup()
493 vm_flags_t newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_vma_lock_flags()
541 if (vma->vm_flags & VM_LOCKED) { in count_mm_mlocked_page_nr()
621 vm_flags_t vm_flags = VM_LOCKED; in SYSCALL_DEFINE3() local
627 vm_flags |= VM_LOCKONFAULT; in SYSCALL_DEFINE3()
[all …]
Duserfaultfd.c65 bool writable = dst_vma->vm_flags & VM_WRITE; in mfill_atomic_install_pte()
66 bool vm_shared = dst_vma->vm_flags & VM_SHARED; in mfill_atomic_install_pte()
333 int vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
383 vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
513 if (!(dst_vma->vm_flags & VM_SHARED)) { in mfill_atomic_pte()
588 dst_vma->vm_flags & VM_SHARED)) in __mcopy_atomic()
596 if (wp_copy && !(dst_vma->vm_flags & VM_UFFD_WP)) in __mcopy_atomic()
618 if (!(dst_vma->vm_flags & VM_SHARED) && in __mcopy_atomic()
732 newprot = vm_get_page_prot(dst_vma->vm_flags & ~(VM_WRITE)); in uffd_wp_range()
734 newprot = vm_get_page_prot(dst_vma->vm_flags); in uffd_wp_range()
[all …]
/linux-6.1.9/arch/powerpc/include/asm/book3s/64/
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()
Dpkeys.h8 static inline u64 vmflag_to_pte_pkey_bits(u64 vm_flags) in vmflag_to_pte_pkey_bits() argument
15 return hash__vmflag_to_pte_pkey_bits(vm_flags); in vmflag_to_pte_pkey_bits()
/linux-6.1.9/arch/sparc/include/asm/
Dmman.h57 #define arch_validate_flags(vm_flags) arch_validate_flags(vm_flags) argument
61 static inline bool arch_validate_flags(unsigned long vm_flags) in arch_validate_flags() argument
67 if (vm_flags & VM_SPARC_ADI) { in arch_validate_flags()
72 if (vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) in arch_validate_flags()
83 if (vm_flags & VM_MERGEABLE) in arch_validate_flags()
/linux-6.1.9/arch/x86/mm/
Dpgprot.c35 pgprot_t vm_get_page_prot(unsigned long vm_flags) in vm_get_page_prot() argument
37 unsigned long val = pgprot_val(protection_map[vm_flags & in vm_get_page_prot()
48 if (vm_flags & VM_PKEY_BIT0) in vm_get_page_prot()
50 if (vm_flags & VM_PKEY_BIT1) in vm_get_page_prot()
52 if (vm_flags & VM_PKEY_BIT2) in vm_get_page_prot()
54 if (vm_flags & VM_PKEY_BIT3) in vm_get_page_prot()
/linux-6.1.9/include/linux/
Duserfaultfd_k.h99 return vma->vm_flags & (VM_UFFD_WP | VM_UFFD_MINOR); in uffd_disable_huge_pmd_share()
111 return vma->vm_flags & (VM_UFFD_WP | VM_UFFD_MINOR); in uffd_disable_fault_around()
116 return vma->vm_flags & VM_UFFD_MISSING; in userfaultfd_missing()
121 return vma->vm_flags & VM_UFFD_WP; in userfaultfd_wp()
126 return vma->vm_flags & VM_UFFD_MINOR; in userfaultfd_minor()
143 return vma->vm_flags & __VM_UFFD_FLAGS; in userfaultfd_armed()
147 unsigned long vm_flags) in vma_can_userfault() argument
149 if ((vm_flags & VM_UFFD_MINOR) && in vma_can_userfault()
158 if ((vm_flags & VM_UFFD_WP) && !vma_is_anonymous(vma)) in vma_can_userfault()
/linux-6.1.9/arch/arm64/include/asm/
Dmman.h53 static inline bool arch_validate_flags(unsigned long vm_flags) in arch_validate_flags() argument
59 return !(vm_flags & VM_MTE) || (vm_flags & VM_MTE_ALLOWED); in arch_validate_flags()
61 #define arch_validate_flags(vm_flags) arch_validate_flags(vm_flags) argument
/linux-6.1.9/drivers/misc/
Dopen-dice.c94 if ((vma->vm_flags & VM_WRITE) && (vma->vm_flags & VM_SHARED)) in open_dice_mmap()
98 if (vma->vm_flags & VM_WRITE) in open_dice_mmap()
99 vma->vm_flags &= ~VM_MAYSHARE; in open_dice_mmap()
100 else if (vma->vm_flags & VM_SHARED) in open_dice_mmap()
101 vma->vm_flags &= ~VM_MAYWRITE; in open_dice_mmap()
105 vma->vm_flags |= VM_DONTCOPY | VM_DONTDUMP; in open_dice_mmap()
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dbpf_iter_task_vma.c43 perm_str[0] = (vma->vm_flags & VM_READ) ? 'r' : '-'; in proc_maps()
44 perm_str[1] = (vma->vm_flags & VM_WRITE) ? 'w' : '-'; in proc_maps()
45 perm_str[2] = (vma->vm_flags & VM_EXEC) ? 'x' : '-'; in proc_maps()
46 perm_str[3] = (vma->vm_flags & VM_MAYSHARE) ? 's' : 'p'; in proc_maps()
/linux-6.1.9/arch/arm64/mm/
Dmmap.c80 pgprot_t vm_get_page_prot(unsigned long vm_flags) in vm_get_page_prot() argument
82 pteval_t prot = pgprot_val(protection_map[vm_flags & in vm_get_page_prot()
85 if (vm_flags & VM_ARM64_BTI) in vm_get_page_prot()
98 if (vm_flags & VM_MTE) in vm_get_page_prot()
Dfault.c487 unsigned int mm_flags, unsigned long vm_flags, in __do_page_fault() argument
500 if (!(vma->vm_flags & VM_GROWSDOWN)) in __do_page_fault()
510 if (!(vma->vm_flags & vm_flags)) in __do_page_fault()
535 unsigned long vm_flags; in do_page_fault() local
560 vm_flags = VM_EXEC; in do_page_fault()
564 vm_flags = VM_WRITE; in do_page_fault()
568 vm_flags = VM_READ; in do_page_fault()
570 vm_flags |= VM_WRITE; in do_page_fault()
573 vm_flags |= VM_EXEC; in do_page_fault()
612 fault = __do_page_fault(mm, addr, mm_flags, vm_flags, regs); in do_page_fault()
[all …]
/linux-6.1.9/arch/hexagon/mm/
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-6.1.9/fs/
Duserfaultfd.c114 const bool uffd_wp_changed = (vma->vm_flags ^ flags) & VM_UFFD_WP; in userfaultfd_set_vm_flags()
116 vma->vm_flags = flags; in userfaultfd_set_vm_flags()
122 if ((vma->vm_flags & VM_SHARED) && uffd_wp_changed) in userfaultfd_set_vm_flags()
637 vma->vm_flags & ~__VM_UFFD_FLAGS); in userfaultfd_event_wait_completion()
671 userfaultfd_set_vm_flags(vma, vma->vm_flags & ~__VM_UFFD_FLAGS); in dup_userfaultfd()
752 userfaultfd_set_vm_flags(vma, vma->vm_flags & ~__VM_UFFD_FLAGS); in mremap_userfaultfd_prep()
896 !!(vma->vm_flags & __VM_UFFD_FLAGS)); in userfaultfd_release()
901 new_flags = vma->vm_flags & ~__VM_UFFD_FLAGS; in userfaultfd_release()
1291 unsigned long vm_flags, new_flags; in userfaultfd_register() local
1309 vm_flags = 0; in userfaultfd_register()
[all …]
/linux-6.1.9/arch/nios2/mm/
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()
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-6.1.9/arch/sparc/mm/
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()
327 if (!(vma->vm_flags & VM_GROWSDOWN)) in force_user_fault()
334 if (!(vma->vm_flags & VM_WRITE)) in force_user_fault()
338 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) in force_user_fault()
/linux-6.1.9/arch/alpha/mm/
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-6.1.9/drivers/gpu/drm/vmwgfx/
Dvmwgfx_ttm_glue.c99 if (!is_cow_mapping(vma->vm_flags)) in vmw_mmap()
100 vma->vm_flags = (vma->vm_flags & ~VM_MIXEDMAP) | VM_PFNMAP; in vmw_mmap()
/linux-6.1.9/arch/ia64/mm/
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()
178 if (!(prev_vma && (prev_vma->vm_flags & VM_GROWSUP) && (address == prev_vma->vm_end))) { in ia64_do_page_fault()
181 if (!(vma->vm_flags & VM_GROWSDOWN)) in ia64_do_page_fault()

12345678910>>...13