/openbmc/linux/include/trace/events/ |
H A D | fs_dax.h | 18 __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 …]
|
/openbmc/linux/mm/ |
H A D | mmap.c | 84 static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags) in vm_pgprot_modify() argument 86 return pgprot_modify(oldprot, vm_get_page_prot(vm_flags)); in vm_pgprot_modify() 92 unsigned long vm_flags = vma->vm_flags; in vma_set_page_prot() local 95 vm_page_prot = vm_pgprot_modify(vma->vm_page_prot, vm_flags); in vma_set_page_prot() 97 vm_flags &= ~VM_SHARED; in vma_set_page_prot() 98 vm_page_prot = vm_pgprot_modify(vm_page_prot, vm_flags); in vma_set_page_prot() 110 if (vma->vm_flags & VM_SHARED) in __remove_shared_vm_struct() 386 if (vma->vm_flags & VM_SHARED) in __vma_link_file() 720 struct file *file, unsigned long vm_flags, in is_mergeable_vma() argument 732 if ((vma->vm_flags ^ vm_flags) & ~VM_SOFTDIRTY) in is_mergeable_vma() [all …]
|
H A D | nommu.c | 126 if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) in follow_pfn() 154 pgprot_t prot, unsigned long vm_flags, int node, in __vmalloc_node_range() argument 530 if (region->vm_flags & VM_MAPPED_COPY) in __put_nommu_region() 854 unsigned long vm_flags; in determine_vm_flags() local 856 vm_flags = calc_vm_prot_bits(prot, 0) | calc_vm_flag_bits(file, flags); in determine_vm_flags() 863 vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; in determine_vm_flags() 867 vm_flags |= (capabilities & NOMMU_VMFLAGS); in determine_vm_flags() 869 vm_flags |= VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; in determine_vm_flags() 880 vm_flags |= VM_MAYOVERLAY; in determine_vm_flags() 883 vm_flags |= VM_SHARED | VM_MAYSHARE | in determine_vm_flags() [all …]
|
H A D | mremap.c | 599 unsigned long vm_flags = vma->vm_flags; in move_vma() local 636 MADV_UNMERGEABLE, &vm_flags); in move_vma() 640 if (vm_flags & VM_ACCOUNT) { in move_vma() 650 if (vm_flags & VM_ACCOUNT) in move_vma() 684 if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNMAP)) { in move_vma() 702 vm_stat_account(mm, vma->vm_flags, new_len >> PAGE_SHIFT); in move_vma() 705 if (unlikely(vma->vm_flags & VM_PFNMAP)) in move_vma() 727 if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNMAP)) in move_vma() 732 if (vm_flags & VM_LOCKED) { in move_vma() 772 if (!old_len && !(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) { in vma_to_resize() [all …]
|
H A D | mprotect.c | 47 if (WARN_ON_ONCE(!(vma->vm_flags & VM_WRITE))) in can_change_pte_writable() 62 if (!(vma->vm_flags & VM_SHARED)) { in can_change_pte_writable() 101 if (prot_numa && !(vma->vm_flags & VM_SHARED) && in change_pte_range() 130 if (is_cow_mapping(vma->vm_flags) && in change_pte_range() 580 unsigned long oldflags = vma->vm_flags; in mprotect_fixup() 598 (vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) && in mprotect_fixup() 637 VM_WARN_ON((vma->vm_flags ^ newflags) & ~VM_SOFTDIRTY); in mprotect_fixup() 743 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_mprotect_pkey() 751 if (!(vma->vm_flags & VM_GROWSUP)) in do_mprotect_pkey() 774 if (rier && (vma->vm_flags & VM_MAYEXEC)) in do_mprotect_pkey() [all …]
|
H A D | mlock.c | 325 if (vma->vm_flags & VM_LOCKED) in mlock_pte_range() 346 if (vma->vm_flags & VM_LOCKED) in mlock_pte_range() 420 vm_flags_t oldflags = vma->vm_flags; in mlock_fixup() 508 newflags = vma->vm_flags & ~VM_LOCKED_MASK; in apply_vma_lock_flags() 549 if (vma->vm_flags & VM_LOCKED) { in count_mm_mlocked_page_nr() 629 vm_flags_t vm_flags = VM_LOCKED; in SYSCALL_DEFINE3() local 635 vm_flags |= VM_LOCKONFAULT; in SYSCALL_DEFINE3() 637 return do_mlock(start, len, vm_flags); in SYSCALL_DEFINE3() 693 newflags = vma->vm_flags & ~VM_LOCKED_MASK; in apply_mlockall_flags()
|
H A D | memory.c | 529 (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); in print_bad_pte() 591 if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) in vm_normal_page() 612 if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) { in vm_normal_page() 613 if (vma->vm_flags & VM_MIXEDMAP) { in vm_normal_page() 622 if (!is_cow_mapping(vma->vm_flags)) in vm_normal_page() 665 if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) { in vm_normal_page_pmd() 666 if (vma->vm_flags & VM_MIXEDMAP) { in vm_normal_page_pmd() 675 if (!is_cow_mapping(vma->vm_flags)) in vm_normal_page_pmd() 770 unsigned long vm_flags = dst_vma->vm_flags; in copy_nonpresent_pte() local 800 is_cow_mapping(vm_flags)) { in copy_nonpresent_pte() [all …]
|
/openbmc/linux/arch/powerpc/include/asm/book3s/64/ |
H A D | hash-pkey.h | 8 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()
|
H A D | pkeys.h | 8 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()
|
/openbmc/linux/arch/sparc/include/asm/ |
H A D | mman.h | 57 #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()
|
/openbmc/linux/arch/x86/mm/ |
H A D | pgprot.c | 35 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()
|
/openbmc/linux/arch/arm64/include/asm/ |
H A D | mman.h | 57 static inline bool arch_validate_flags(unsigned long vm_flags) in arch_validate_flags() argument 63 return !(vm_flags & VM_MTE) || (vm_flags & VM_MTE_ALLOWED); in arch_validate_flags() 65 #define arch_validate_flags(vm_flags) arch_validate_flags(vm_flags) argument
|
/openbmc/linux/include/linux/ |
H A D | userfaultfd_k.h | 116 return vma->vm_flags & (VM_UFFD_WP | VM_UFFD_MINOR); in uffd_disable_huge_pmd_share() 128 return vma->vm_flags & (VM_UFFD_WP | VM_UFFD_MINOR); in uffd_disable_fault_around() 133 return vma->vm_flags & VM_UFFD_MISSING; in userfaultfd_missing() 138 return vma->vm_flags & VM_UFFD_WP; in userfaultfd_wp() 143 return vma->vm_flags & VM_UFFD_MINOR; in userfaultfd_minor() 160 return vma->vm_flags & __VM_UFFD_FLAGS; in userfaultfd_armed() 164 unsigned long vm_flags) in vma_can_userfault() argument 166 if ((vm_flags & VM_UFFD_MINOR) && in vma_can_userfault() 175 if ((vm_flags & VM_UFFD_WP) && !vma_is_anonymous(vma)) in vma_can_userfault()
|
H A D | huge_mm.h | 129 (vma->vm_flags & VM_EXEC) && in file_thp_enabled() 133 bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags, 141 unsigned long vm_flags) in vma_thp_disabled() argument 148 return (vm_flags & VM_NOHUGEPAGE) || in vma_thp_disabled() 197 int hugepage_madvise(struct vm_area_struct *vma, unsigned long *vm_flags, 295 unsigned long vm_flags, bool smaps, in hugepage_vma_check() argument 334 unsigned long *vm_flags, int advice) in hugepage_madvise() argument
|
H A D | khugepaged.h | 16 unsigned long vm_flags); 49 unsigned long vm_flags) in khugepaged_enter_vma() argument
|
/openbmc/linux/arch/arm64/mm/ |
H A D | mmap.c | 80 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()
|
H A D | fault.c | 502 unsigned int mm_flags, unsigned long vm_flags, in __do_page_fault() argument 511 if (!(vma->vm_flags & vm_flags)) in __do_page_fault() 536 unsigned long vm_flags; in do_page_fault() local 562 vm_flags = VM_EXEC; in do_page_fault() 566 vm_flags = VM_WRITE; in do_page_fault() 570 vm_flags = VM_READ; in do_page_fault() 572 vm_flags |= VM_WRITE; in do_page_fault() 575 vm_flags |= VM_EXEC; in do_page_fault() 597 if (!(vma->vm_flags & vm_flags)) { in do_page_fault() 626 fault = __do_page_fault(mm, vma, addr, mm_flags, vm_flags, regs); in do_page_fault() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/progs/ |
H A D | bpf_iter_task_vma.c | 43 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()
|
/openbmc/linux/arch/nios2/mm/ |
H A D | cacheflush.c | 90 if (!(vma->vm_flags & VM_MAYSHARE)) in flush_aliases() 138 if (vma == NULL || (vma->vm_flags & VM_EXEC)) in flush_cache_range() 159 if (vma->vm_flags & VM_EXEC) in flush_cache_page() 236 if (vma->vm_flags & VM_EXEC) in update_mmu_cache_range() 268 if (vma->vm_flags & VM_EXEC) in copy_from_user_page() 279 if (vma->vm_flags & VM_EXEC) in copy_to_user_page()
|
/openbmc/linux/fs/ |
H A D | userfaultfd.c | 144 const bool uffd_wp_changed = (vma->vm_flags ^ flags) & VM_UFFD_WP; in userfaultfd_set_vm_flags() 152 if ((vma->vm_flags & VM_SHARED) && uffd_wp_changed) in userfaultfd_set_vm_flags() 663 vma->vm_flags & ~__VM_UFFD_FLAGS); in userfaultfd_event_wait_completion() 698 userfaultfd_set_vm_flags(vma, vma->vm_flags & ~__VM_UFFD_FLAGS); in dup_userfaultfd() 780 userfaultfd_set_vm_flags(vma, vma->vm_flags & ~__VM_UFFD_FLAGS); in mremap_userfaultfd_prep() 919 !!(vma->vm_flags & __VM_UFFD_FLAGS)); in userfaultfd_release() 928 new_flags = vma->vm_flags & ~__VM_UFFD_FLAGS; in userfaultfd_release() 1327 unsigned long vm_flags, new_flags; in userfaultfd_register() local 1346 vm_flags = 0; in userfaultfd_register() 1348 vm_flags |= VM_UFFD_MISSING; in userfaultfd_register() [all …]
|
/openbmc/linux/arch/hexagon/mm/ |
H A D | vm_fault.c | 69 if (!(vma->vm_flags & VM_EXEC)) in do_page_fault() 73 if (!(vma->vm_flags & VM_READ)) in do_page_fault() 77 if (!(vma->vm_flags & VM_WRITE)) in do_page_fault()
|
/openbmc/linux/drivers/sbus/char/ |
H A D | flash.c | 44 if ((vma->vm_flags & VM_READ) && in flash_mmap() 45 (vma->vm_flags & VM_WRITE)) { in flash_mmap() 49 if (vma->vm_flags & VM_READ) { in flash_mmap() 52 } else if (vma->vm_flags & VM_WRITE) { in flash_mmap()
|
/openbmc/linux/arch/sparc/mm/ |
H A D | fault_64.c | 352 (vma->vm_flags & VM_WRITE) != 0) { in do_sparc64_fault() 373 if (!(vma->vm_flags & VM_GROWSDOWN)) in do_sparc64_fault() 402 if ((fault_code & FAULT_CODE_ITLB) && !(vma->vm_flags & VM_EXEC)) { in do_sparc64_fault() 410 if (!(vma->vm_flags & VM_WRITE)) in do_sparc64_fault() 417 (vma->vm_flags & VM_EXEC) != 0 && in do_sparc64_fault() 425 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) in do_sparc64_fault()
|
/openbmc/linux/arch/alpha/mm/ |
H A D | fault.c | 130 if (!(vma->vm_flags & VM_EXEC)) in do_page_fault() 134 if (!(vma->vm_flags & (VM_READ | VM_WRITE))) in do_page_fault() 137 if (!(vma->vm_flags & VM_WRITE)) in do_page_fault()
|
/openbmc/linux/arch/csky/abiv1/ |
H A D | cacheflush.c | 63 if (vma->vm_flags & VM_EXEC) in update_mmu_cache_range() 73 if (vma->vm_flags & VM_EXEC) in flush_cache_range()
|