Home
last modified time | relevance | path

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

12345678910>>...13

/kernel/linux/linux-5.10/arch/arm64/include/asm/
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
/kernel/linux/linux-5.10/arch/sparc/include/asm/
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()
/kernel/linux/linux-5.10/arch/powerpc/include/asm/
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
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/mm/
Dmmap.c116 pgprot_t vm_get_page_prot(unsigned long vm_flags) in vm_get_page_prot() argument
118 pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags & in vm_get_page_prot()
120 pgprot_val(arch_vm_get_page_prot(vm_flags))); in vm_get_page_prot()
126 static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags) in vm_pgprot_modify() argument
128 return pgprot_modify(oldprot, vm_get_page_prot(vm_flags)); in vm_pgprot_modify()
134 unsigned long vm_flags = vma->vm_flags; in vma_set_page_prot() local
137 vm_page_prot = vm_pgprot_modify(vma->vm_page_prot, vm_flags); in vma_set_page_prot()
139 vm_flags &= ~VM_SHARED; in vma_set_page_prot()
140 vm_page_prot = vm_pgprot_modify(vm_page_prot, vm_flags); in vma_set_page_prot()
152 if (vma->vm_flags & VM_DENYWRITE) in __remove_shared_vm_struct()
[all …]
Dmremap.c341 unsigned long vm_flags = vma->vm_flags; in move_vma() local
365 MADV_UNMERGEABLE, &vm_flags); in move_vma()
402 if (vm_flags & VM_ACCOUNT) { in move_vma()
403 vma->vm_flags &= ~VM_ACCOUNT; in move_vma()
420 vm_stat_account(mm, vma->vm_flags, new_len >> PAGE_SHIFT); in move_vma()
423 if (unlikely(vma->vm_flags & VM_PFNMAP)) in move_vma()
427 if (vm_flags & VM_ACCOUNT) { in move_vma()
429 vma->vm_flags |= VM_ACCOUNT; in move_vma()
446 vma->vm_flags &= VM_LOCKED_CLEAR_MASK; in move_vma()
458 if (vm_flags & VM_LOCKED) { in move_vma()
[all …]
Dnommu.c127 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) in follow_pfn()
155 pgprot_t prot, unsigned long vm_flags, int node, in __vmalloc_node_range() argument
178 vma->vm_flags |= VM_USERMAP; in __vmalloc_user_flags()
540 if (region->vm_flags & VM_MAPPED_COPY) in __put_nommu_region()
921 unsigned long vm_flags; in determine_vm_flags() local
923 vm_flags = calc_vm_prot_bits(prot, 0) | calc_vm_flag_bits(flags); in determine_vm_flags()
928 vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; in determine_vm_flags()
930 vm_flags |= VM_MAYSHARE; in determine_vm_flags()
935 vm_flags |= VM_MAYSHARE | (capabilities & NOMMU_VMFLAGS); in determine_vm_flags()
937 vm_flags |= VM_SHARED; in determine_vm_flags()
[all …]
Duserfaultfd.c105 if (dst_vma->vm_flags & VM_WRITE) { in mcopy_atomic_pte()
214 int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
215 int vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
265 vm_shared = dst_vma->vm_flags & VM_SHARED; in __mcopy_atomic_hugetlb()
437 if (!(dst_vma->vm_flags & VM_SHARED)) { in mfill_atomic_pte()
516 dst_vma->vm_flags & VM_SHARED)) in __mcopy_atomic()
524 if (wp_copy && !(dst_vma->vm_flags & VM_UFFD_WP)) in __mcopy_atomic()
543 if (!(dst_vma->vm_flags & VM_SHARED) && in __mcopy_atomic()
675 if (!dst_vma || (dst_vma->vm_flags & VM_SHARED)) in mwriteprotect_range()
683 newprot = vm_get_page_prot(dst_vma->vm_flags & ~(VM_WRITE)); in mwriteprotect_range()
[all …]
Dmlock.c453 vma->vm_flags &= VM_LOCKED_CLEAR_MASK; in munlock_vma_pages_range()
532 vm_flags_t old_flags = vma->vm_flags; in mlock_fixup()
534 if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) || in mlock_fixup()
579 vma->vm_flags = newflags; in mlock_fixup()
611 vm_flags_t newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_vma_lock_flags()
662 if (vma->vm_flags & VM_LOCKED) { in count_mm_mlocked_page_nr()
730 vm_flags_t vm_flags = VM_LOCKED; in SYSCALL_DEFINE3() local
736 vm_flags |= VM_LOCKONFAULT; in SYSCALL_DEFINE3()
738 return do_mlock(start, len, vm_flags); in SYSCALL_DEFINE3()
793 newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK; in apply_mlockall_flags()
Dmprotect.c71 if (prot_numa && !(vma->vm_flags & VM_SHARED) && in change_pte_range()
99 if (is_cow_mapping(vma->vm_flags) && in change_pte_range()
140 !(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()
585 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_mprotect_pkey()
593 if (!(vma->vm_flags & VM_GROWSUP)) in do_mprotect_pkey()
608 if (rier && (vma->vm_flags & VM_MAYEXEC)) in do_mprotect_pkey()
[all …]
Drmap.c769 unsigned long vm_flags; member
790 if (!(vma->vm_flags & VM_PURGEABLE)) in page_referenced_one()
791 pra->vm_flags &= ~VM_PURGEABLE; in page_referenced_one()
793 if (vma->vm_flags & VM_LOCKED) { in page_referenced_one()
795 pra->vm_flags |= VM_LOCKED; in page_referenced_one()
810 if (likely(!(vma->vm_flags & VM_SEQ_READ))) in page_referenced_one()
832 pra->vm_flags |= vma->vm_flags & ~VM_PURGEABLE; in page_referenced_one()
865 unsigned long *vm_flags) in page_referenced() argument
871 .vm_flags = VM_PURGEABLE, in page_referenced()
879 *vm_flags = 0; in page_referenced()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/include/asm/book3s/64/
Dhash-pkey.h5 static inline u64 hash__vmflag_to_pte_pkey_bits(u64 vm_flags) in hash__vmflag_to_pte_pkey_bits() argument
7 return (((vm_flags & VM_PKEY_BIT0) ? H_PTE_PKEY_BIT0 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
8 ((vm_flags & VM_PKEY_BIT1) ? H_PTE_PKEY_BIT1 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
9 ((vm_flags & VM_PKEY_BIT2) ? H_PTE_PKEY_BIT2 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
10 ((vm_flags & VM_PKEY_BIT3) ? H_PTE_PKEY_BIT3 : 0x0UL) | in hash__vmflag_to_pte_pkey_bits()
11 ((vm_flags & VM_PKEY_BIT4) ? H_PTE_PKEY_BIT4 : 0x0UL)); in hash__vmflag_to_pte_pkey_bits()
Dpkeys.h10 static inline u64 vmflag_to_pte_pkey_bits(u64 vm_flags) in vmflag_to_pte_pkey_bits() argument
17 return hash__vmflag_to_pte_pkey_bits(vm_flags); in vmflag_to_pte_pkey_bits()
/kernel/linux/linux-5.10/arch/x86/include/uapi/asm/
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))
/kernel/linux/linux-5.10/include/linux/
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
/kernel/linux/linux-5.10/fs/
Duserfaultfd.c609 vma->vm_flags &= ~(VM_UFFD_WP | VM_UFFD_MISSING); in userfaultfd_event_wait_completion()
641 vma->vm_flags &= ~(VM_UFFD_WP | VM_UFFD_MISSING); in dup_userfaultfd()
722 vma->vm_flags &= ~(VM_UFFD_WP | VM_UFFD_MISSING); in mremap_userfaultfd_prep()
863 !!(vma->vm_flags & (VM_UFFD_MISSING | VM_UFFD_WP))); in userfaultfd_release()
868 new_flags = vma->vm_flags & ~(VM_UFFD_MISSING | VM_UFFD_WP); in userfaultfd_release()
878 vma->vm_flags = new_flags; in userfaultfd_release()
1247 unsigned long vm_flags) in vma_can_userfault() argument
1252 !(vm_flags & VM_UFFD_WP)); in vma_can_userfault()
1263 unsigned long vm_flags, new_flags; in userfaultfd_register() local
1281 vm_flags = 0; in userfaultfd_register()
[all …]
/kernel/linux/linux-5.10/arch/nds32/mm/
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()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/arch/nios2/mm/
Dcacheflush.c87 if (!(mpnt->vm_flags & VM_MAYSHARE)) in flush_aliases()
136 if (vma == NULL || (vma->vm_flags & VM_EXEC)) in flush_cache_range()
156 if (vma->vm_flags & VM_EXEC) in flush_cache_page()
228 if (vma->vm_flags & VM_EXEC) in update_mmu_cache()
259 if (vma->vm_flags & VM_EXEC) in copy_from_user_page()
270 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()
/kernel/linux/linux-5.10/drivers/gpu/drm/vmwgfx/
Dvmwgfx_ttm_glue.c52 if ((vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) != VM_MAYWRITE) in vmw_mmap()
53 vma->vm_flags = (vma->vm_flags & ~VM_MIXEDMAP) | VM_PFNMAP; in vmw_mmap()
/kernel/linux/common_modules/xpm/core/
Dxpm_hck_hooks.c93 if (vma->vm_flags & VM_XPM) in is_xpm_readonly_region()
97 if (!xpm_is_anonymous_vma(vma) && (vma->vm_flags & VM_EXEC)) in is_xpm_readonly_region()
110 if ((vflags & FAULT_FLAG_WRITE) && (vma->vm_flags & VM_WRITE) && in xpm_integrity_check()
129 if ((vflags & FAULT_FLAG_WRITE) && (vma->vm_flags & VM_WRITE) && in xpm_integrity_update()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/include/trace/hooks/
Dmm.h13 TP_PROTO(vm_flags_t *vm_flags, int *err),
14 TP_ARGS(vm_flags, err)
/kernel/linux/linux-5.10/arch/ia64/mm/
Dfault.c138 if (((isr >> IA64_ISR_R_BIT) & 1UL) && (!(vma->vm_flags & (VM_READ | VM_WRITE)))) in ia64_do_page_fault()
141 if ((vma->vm_flags & mask) != mask) in ia64_do_page_fault()
188 if (!(prev_vma && (prev_vma->vm_flags & VM_GROWSUP) && (address == prev_vma->vm_end))) { in ia64_do_page_fault()
191 if (!(vma->vm_flags & VM_GROWSDOWN)) in ia64_do_page_fault()

12345678910>>...13