• Home
  • Raw
  • Download

Lines Matching refs:vma

179 		ret = expand_stack_downwards(bprm->vma, pos);  in get_arg_page()
190 unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; in get_arg_page()
233 flush_cache_page(bprm->vma, pos, page_to_pfn(page)); in flush_arg_page()
239 struct vm_area_struct *vma = NULL; in __bprm_mm_init() local
242 bprm->vma = vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); in __bprm_mm_init()
243 if (!vma) in __bprm_mm_init()
247 vma->vm_mm = mm; in __bprm_mm_init()
255 vma->vm_end = STACK_TOP_MAX; in __bprm_mm_init()
256 vma->vm_start = vma->vm_end - PAGE_SIZE; in __bprm_mm_init()
257 vma->vm_flags = VM_STACK_FLAGS; in __bprm_mm_init()
258 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); in __bprm_mm_init()
259 err = insert_vm_struct(mm, vma); in __bprm_mm_init()
265 bprm->p = vma->vm_end - sizeof(void *); in __bprm_mm_init()
269 bprm->vma = NULL; in __bprm_mm_init()
270 kmem_cache_free(vm_area_cachep, vma); in __bprm_mm_init()
507 static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift) in shift_arg_pages() argument
509 struct mm_struct *mm = vma->vm_mm; in shift_arg_pages()
510 unsigned long old_start = vma->vm_start; in shift_arg_pages()
511 unsigned long old_end = vma->vm_end; in shift_arg_pages()
523 if (vma != find_vma(mm, new_start)) in shift_arg_pages()
529 vma_adjust(vma, new_start, old_end, vma->vm_pgoff, NULL); in shift_arg_pages()
535 if (length != move_page_tables(vma, old_start, in shift_arg_pages()
536 vma, new_start, length)) in shift_arg_pages()
546 vma->vm_next ? vma->vm_next->vm_start : 0); in shift_arg_pages()
555 vma->vm_next ? vma->vm_next->vm_start : 0); in shift_arg_pages()
562 vma_adjust(vma, new_start, new_end, vma->vm_pgoff, NULL); in shift_arg_pages()
580 struct vm_area_struct *vma = bprm->vma; in setup_arg_pages() local
592 if (vma->vm_end - vma->vm_start > stack_base) in setup_arg_pages()
597 stack_shift = vma->vm_start - stack_base; in setup_arg_pages()
599 bprm->p = vma->vm_end - stack_shift; in setup_arg_pages()
603 stack_shift = vma->vm_end - stack_top; in setup_arg_pages()
627 ret = mprotect_fixup(vma, &prev, vma->vm_start, vma->vm_end, in setup_arg_pages()
631 BUG_ON(prev != vma); in setup_arg_pages()
635 ret = shift_arg_pages(vma, stack_shift); in setup_arg_pages()
643 stack_base = vma->vm_end + EXTRA_STACK_VM_PAGES * PAGE_SIZE; in setup_arg_pages()
645 stack_base = vma->vm_start - EXTRA_STACK_VM_PAGES * PAGE_SIZE; in setup_arg_pages()
647 ret = expand_stack(vma, stack_base); in setup_arg_pages()