Lines Matching refs:vma
261 static int ringbuf_map_mmap_kern(struct bpf_map *map, struct vm_area_struct *vma) in ringbuf_map_mmap_kern() argument
267 if (vma->vm_flags & VM_WRITE) { in ringbuf_map_mmap_kern()
269 if (vma->vm_pgoff != 0 || vma->vm_end - vma->vm_start != PAGE_SIZE) in ringbuf_map_mmap_kern()
272 vm_flags_clear(vma, VM_MAYWRITE); in ringbuf_map_mmap_kern()
275 return remap_vmalloc_range(vma, rb_map->rb, in ringbuf_map_mmap_kern()
276 vma->vm_pgoff + RINGBUF_PGOFF); in ringbuf_map_mmap_kern()
279 static int ringbuf_map_mmap_user(struct bpf_map *map, struct vm_area_struct *vma) in ringbuf_map_mmap_user() argument
285 if (vma->vm_flags & VM_WRITE) { in ringbuf_map_mmap_user()
286 if (vma->vm_pgoff == 0) in ringbuf_map_mmap_user()
293 vm_flags_clear(vma, VM_MAYWRITE); in ringbuf_map_mmap_user()
296 return remap_vmalloc_range(vma, rb_map->rb, vma->vm_pgoff + RINGBUF_PGOFF); in ringbuf_map_mmap_user()