Home
last modified time | relevance | path

Searched refs:vma (Results 1 – 14 of 14) sorted by relevance

/kernel/events/
Duprobes.c121 static bool valid_vma(struct vm_area_struct *vma, bool is_register) in valid_vma() argument
128 return vma->vm_file && (vma->vm_flags & flags) == VM_MAYEXEC; in valid_vma()
131 static unsigned long offset_to_vaddr(struct vm_area_struct *vma, loff_t offset) in offset_to_vaddr() argument
133 return vma->vm_start + offset - ((loff_t)vma->vm_pgoff << PAGE_SHIFT); in offset_to_vaddr()
136 static loff_t vaddr_to_offset(struct vm_area_struct *vma, unsigned long vaddr) in vaddr_to_offset() argument
138 return ((loff_t)vma->vm_pgoff << PAGE_SHIFT) + (vaddr - vma->vm_start); in vaddr_to_offset()
154 static int __replace_page(struct vm_area_struct *vma, unsigned long addr, in __replace_page() argument
157 struct mm_struct *mm = vma->vm_mm; in __replace_page()
160 .vma = vma, in __replace_page()
167 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, mm, addr, in __replace_page()
[all …]
Dcore.c5440 struct perf_event *event = vmf->vma->vm_file->private_data; in perf_mmap_fault()
5463 vmf->page->mapping = vmf->vma->vm_file->f_mapping; in perf_mmap_fault()
5570 static void perf_mmap_open(struct vm_area_struct *vma) in perf_mmap_open() argument
5572 struct perf_event *event = vma->vm_file->private_data; in perf_mmap_open()
5577 if (vma->vm_pgoff) in perf_mmap_open()
5581 event->pmu->event_mapped(event, vma->vm_mm); in perf_mmap_open()
5594 static void perf_mmap_close(struct vm_area_struct *vma) in perf_mmap_close() argument
5596 struct perf_event *event = vma->vm_file->private_data; in perf_mmap_close()
5604 event->pmu->event_unmapped(event, vma->vm_mm); in perf_mmap_close()
5611 if (rb_has_aux(rb) && vma->vm_pgoff == rb->aux_pgoff && in perf_mmap_close()
[all …]
/kernel/dma/
Dmapping.c187 int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, in dma_common_mmap() argument
192 unsigned long user_count = vma_pages(vma); in dma_common_mmap()
194 unsigned long off = vma->vm_pgoff; in dma_common_mmap()
198 vma->vm_page_prot = dma_pgprot(dev, vma->vm_page_prot, attrs); in dma_common_mmap()
200 if (dma_mmap_from_dev_coherent(dev, vma, cpu_addr, size, &ret)) in dma_common_mmap()
218 return remap_pfn_range(vma, vma->vm_start, pfn + vma->vm_pgoff, in dma_common_mmap()
219 user_count << PAGE_SHIFT, vma->vm_page_prot); in dma_common_mmap()
259 int dma_mmap_attrs(struct device *dev, struct vm_area_struct *vma, in dma_mmap_attrs() argument
266 return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size, in dma_mmap_attrs()
270 return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs); in dma_mmap_attrs()
Dcoherent.c238 struct vm_area_struct *vma, void *vaddr, size_t size, int *ret) in __dma_mmap_from_coherent() argument
242 unsigned long off = vma->vm_pgoff; in __dma_mmap_from_coherent()
244 int user_count = vma_pages(vma); in __dma_mmap_from_coherent()
250 *ret = remap_pfn_range(vma, vma->vm_start, pfn, in __dma_mmap_from_coherent()
252 vma->vm_page_prot); in __dma_mmap_from_coherent()
274 int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma, in dma_mmap_from_dev_coherent() argument
279 return __dma_mmap_from_coherent(mem, vma, vaddr, size, ret); in dma_mmap_from_dev_coherent()
282 int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *vaddr, in dma_mmap_from_global_coherent() argument
288 return __dma_mmap_from_coherent(dma_coherent_default_memory, vma, in dma_mmap_from_global_coherent()
Ddummy.c7 static int dma_dummy_mmap(struct device *dev, struct vm_area_struct *vma, in dma_dummy_mmap() argument
/kernel/
Dsys.c1846 struct vm_area_struct *vma; in prctl_set_mm_exe_file() local
1849 for (vma = mm->mmap; vma; vma = vma->vm_next) { in prctl_set_mm_exe_file()
1850 if (!vma->vm_file) in prctl_set_mm_exe_file()
1852 if (path_equal(&vma->vm_file->f_path, in prctl_set_mm_exe_file()
2095 struct vm_area_struct *vma; in prctl_set_mm() local
2128 vma = find_vma(mm, addr); in prctl_set_mm()
2198 if (!vma) { in prctl_set_mm()
2265 static int prctl_update_vma_anon_name(struct vm_area_struct *vma, in prctl_update_vma_anon_name() argument
2270 struct mm_struct *mm = vma->vm_mm; in prctl_update_vma_anon_name()
2274 if (name_addr == vma_get_anon_name(vma)) { in prctl_update_vma_anon_name()
[all …]
Dkcov.c442 static int kcov_mmap(struct file *filep, struct vm_area_struct *vma) in kcov_mmap() argument
446 struct kcov *kcov = vma->vm_file->private_data; in kcov_mmap()
450 area = vmalloc_user(vma->vm_end - vma->vm_start); in kcov_mmap()
456 if (kcov->mode != KCOV_MODE_INIT || vma->vm_pgoff != 0 || in kcov_mmap()
457 vma->vm_end - vma->vm_start != size) { in kcov_mmap()
463 vma->vm_flags |= VM_DONTEXPAND; in kcov_mmap()
467 if (vm_insert_page(vma, vma->vm_start + off, page)) in kcov_mmap()
Dacct.c540 struct vm_area_struct *vma; in acct_collect() local
543 vma = current->mm->mmap; in acct_collect()
544 while (vma) { in acct_collect()
545 vsize += vma->vm_end - vma->vm_start; in acct_collect()
546 vma = vma->vm_next; in acct_collect()
Drelay.c33 static void relay_file_mmap_close(struct vm_area_struct *vma) in relay_file_mmap_close() argument
35 struct rchan_buf *buf = vma->vm_private_data; in relay_file_mmap_close()
36 buf->chan->cb->buf_unmapped(buf, vma->vm_file); in relay_file_mmap_close()
45 struct rchan_buf *buf = vmf->vma->vm_private_data; in relay_buf_fault()
96 static int relay_mmap_buf(struct rchan_buf *buf, struct vm_area_struct *vma) in relay_mmap_buf() argument
98 unsigned long length = vma->vm_end - vma->vm_start; in relay_mmap_buf()
99 struct file *filp = vma->vm_file; in relay_mmap_buf()
107 vma->vm_ops = &relay_file_mmap_ops; in relay_mmap_buf()
108 vma->vm_flags |= VM_DONTEXPAND; in relay_mmap_buf()
109 vma->vm_private_data = buf; in relay_mmap_buf()
[all …]
Dfork.c348 struct vm_area_struct *vma; in vm_area_alloc() local
350 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); in vm_area_alloc()
351 if (vma) in vm_area_alloc()
352 vma_init(vma, mm); in vm_area_alloc()
353 return vma; in vm_area_alloc()
367 void vm_area_free(struct vm_area_struct *vma) in vm_area_free() argument
369 kmem_cache_free(vm_area_cachep, vma); in vm_area_free()
Dsignal.c4496 __weak const char *arch_vma_name(struct vm_area_struct *vma) in arch_vma_name() argument
/kernel/bpf/
Dstackmap.c244 static int stack_map_get_build_id(struct vm_area_struct *vma, in stack_map_get_build_id() argument
253 if (!vma->vm_file) in stack_map_get_build_id()
256 page = find_get_page(vma->vm_file->f_mapping, 0); in stack_map_get_build_id()
286 struct vm_area_struct *vma; in stack_map_get_build_id_offset() local
319 vma = find_vma(current->mm, ips[i]); in stack_map_get_build_id_offset()
320 if (!vma || stack_map_get_build_id(vma, id_offs[i].build_id)) { in stack_map_get_build_id_offset()
327 id_offs[i].offset = (vma->vm_pgoff << PAGE_SHIFT) + ips[i] in stack_map_get_build_id_offset()
328 - vma->vm_start; in stack_map_get_build_id_offset()
/kernel/trace/
Dtrace_output.c379 const struct vm_area_struct *vma; in seq_print_user_ip() local
382 vma = find_vma(mm, ip); in seq_print_user_ip()
383 if (vma) { in seq_print_user_ip()
384 file = vma->vm_file; in seq_print_user_ip()
385 vmstart = vma->vm_start; in seq_print_user_ip()
/kernel/sched/
Dfair.c2490 struct vm_area_struct *vma; in task_numa_work() local
2546 vma = find_vma(mm, start); in task_numa_work()
2547 if (!vma) { in task_numa_work()
2550 vma = mm->mmap; in task_numa_work()
2552 for (; vma; vma = vma->vm_next) { in task_numa_work()
2553 if (!vma_migratable(vma) || !vma_policy_mof(vma) || in task_numa_work()
2554 is_vm_hugetlb_page(vma) || (vma->vm_flags & VM_MIXEDMAP)) { in task_numa_work()
2564 if (!vma->vm_mm || in task_numa_work()
2565 (vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ))) in task_numa_work()
2572 if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))) in task_numa_work()
[all …]