Lines Matching refs:vma
181 struct vm_area_struct *vma; in create_elf_tables() local
302 vma = find_extend_vma(current->mm, bprm->p); in create_elf_tables()
303 if (!vma) in create_elf_tables()
1275 static bool always_dump_vma(struct vm_area_struct *vma) in always_dump_vma() argument
1278 if (vma == get_gate_vma(vma->vm_mm)) in always_dump_vma()
1285 if (vma->vm_ops && vma->vm_ops->name && vma->vm_ops->name(vma)) in always_dump_vma()
1292 if (arch_vma_name(vma)) in always_dump_vma()
1301 static unsigned long vma_dump_size(struct vm_area_struct *vma, in vma_dump_size() argument
1307 if (always_dump_vma(vma)) in vma_dump_size()
1310 if (vma->vm_flags & VM_DONTDUMP) in vma_dump_size()
1314 if (vma_is_dax(vma)) { in vma_dump_size()
1315 if ((vma->vm_flags & VM_SHARED) && FILTER(DAX_SHARED)) in vma_dump_size()
1317 if (!(vma->vm_flags & VM_SHARED) && FILTER(DAX_PRIVATE)) in vma_dump_size()
1323 if (vma->vm_flags & VM_HUGETLB) { in vma_dump_size()
1324 if ((vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_SHARED)) in vma_dump_size()
1326 if (!(vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_PRIVATE)) in vma_dump_size()
1332 if (vma->vm_flags & VM_IO) in vma_dump_size()
1336 if (vma->vm_flags & VM_SHARED) { in vma_dump_size()
1337 if (file_inode(vma->vm_file)->i_nlink == 0 ? in vma_dump_size()
1344 if (vma->anon_vma && FILTER(ANON_PRIVATE)) in vma_dump_size()
1346 if (vma->vm_file == NULL) in vma_dump_size()
1358 vma->vm_pgoff == 0 && (vma->vm_flags & VM_READ)) { in vma_dump_size()
1359 u32 __user *header = (u32 __user *) vma->vm_start; in vma_dump_size()
1391 return vma->vm_end - vma->vm_start; in vma_dump_size()
1583 struct vm_area_struct *vma; in fill_files_note() local
1608 for (vma = current->mm->mmap; vma != NULL; vma = vma->vm_next) { in fill_files_note()
1612 file = vma->vm_file; in fill_files_note()
1632 *start_end_ofs++ = vma->vm_start; in fill_files_note()
1633 *start_end_ofs++ = vma->vm_end; in fill_files_note()
1634 *start_end_ofs++ = vma->vm_pgoff; in fill_files_note()
2190 struct vm_area_struct *vma, *gate_vma; in elf_core_dump() local
2273 for (i = 0, vma = first_vma(current, gate_vma); vma != NULL; in elf_core_dump()
2274 vma = next_vma(vma, gate_vma)) { in elf_core_dump()
2277 dump_size = vma_dump_size(vma, cprm->mm_flags); in elf_core_dump()
2302 for (i = 0, vma = first_vma(current, gate_vma); vma != NULL; in elf_core_dump()
2303 vma = next_vma(vma, gate_vma)) { in elf_core_dump()
2308 phdr.p_vaddr = vma->vm_start; in elf_core_dump()
2311 phdr.p_memsz = vma->vm_end - vma->vm_start; in elf_core_dump()
2313 phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0; in elf_core_dump()
2314 if (vma->vm_flags & VM_WRITE) in elf_core_dump()
2316 if (vma->vm_flags & VM_EXEC) in elf_core_dump()
2338 for (i = 0, vma = first_vma(current, gate_vma); vma != NULL; in elf_core_dump()
2339 vma = next_vma(vma, gate_vma)) { in elf_core_dump()
2343 end = vma->vm_start + vma_filesz[i++]; in elf_core_dump()
2345 for (addr = vma->vm_start; addr < end; addr += PAGE_SIZE) { in elf_core_dump()