/fs/proc/ |
D | task_nommu.c | 21 void task_mem(struct seq_file *m, struct mm_struct *mm) in task_mem() argument 28 down_read(&mm->mmap_sem); in task_mem() 29 for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) { in task_mem() 42 if (atomic_read(&mm->mm_count) > 1 || in task_mem() 52 if (atomic_read(&mm->mm_count) > 1) in task_mem() 53 sbytes += kobjsize(mm); in task_mem() 55 bytes += kobjsize(mm); in task_mem() 80 up_read(&mm->mmap_sem); in task_mem() 83 unsigned long task_vsize(struct mm_struct *mm) in task_vsize() argument 89 down_read(&mm->mmap_sem); in task_vsize() [all …]
|
D | task_mmu.c | 27 void task_mem(struct seq_file *m, struct mm_struct *mm) in task_mem() argument 32 anon = get_mm_counter(mm, MM_ANONPAGES); in task_mem() 33 file = get_mm_counter(mm, MM_FILEPAGES); in task_mem() 34 shmem = get_mm_counter(mm, MM_SHMEMPAGES); in task_mem() 43 hiwater_vm = total_vm = mm->total_vm; in task_mem() 44 if (hiwater_vm < mm->hiwater_vm) in task_mem() 45 hiwater_vm = mm->hiwater_vm; in task_mem() 47 if (hiwater_rss < mm->hiwater_rss) in task_mem() 48 hiwater_rss = mm->hiwater_rss; in task_mem() 50 text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10; in task_mem() [all …]
|
D | base.c | 215 struct mm_struct *mm; in proc_pid_cmdline_read() local 229 mm = get_task_mm(tsk); in proc_pid_cmdline_read() 231 if (!mm) in proc_pid_cmdline_read() 234 if (!mm->env_end) { in proc_pid_cmdline_read() 245 down_read(&mm->mmap_sem); in proc_pid_cmdline_read() 246 arg_start = mm->arg_start; in proc_pid_cmdline_read() 247 arg_end = mm->arg_end; in proc_pid_cmdline_read() 248 env_start = mm->env_start; in proc_pid_cmdline_read() 249 env_end = mm->env_end; in proc_pid_cmdline_read() 250 up_read(&mm->mmap_sem); in proc_pid_cmdline_read() [all …]
|
D | array.c | 397 struct mm_struct *mm = get_task_mm(task); in proc_pid_status() local 402 if (mm) { in proc_pid_status() 403 task_mem(m, mm); in proc_pid_status() 404 mmput(mm); in proc_pid_status() 426 struct mm_struct *mm; in do_task_stat() local 439 mm = get_task_mm(task); in do_task_stat() 440 if (mm) { in do_task_stat() 441 vsize = task_vsize(mm); in do_task_stat() 547 seq_put_decimal_ull(m, " ", mm ? get_mm_rss(mm) : 0); in do_task_stat() 549 seq_put_decimal_ull(m, " ", mm ? (permitted ? mm->start_code : 1) : 0); in do_task_stat() [all …]
|
D | internal.h | 284 struct mm_struct *mm; member
|
D | inode.c | 309 get_area = current->mm->get_unmapped_area; in proc_reg_get_unmapped_area()
|
/fs/ |
D | userfaultfd.c | 66 struct mm_struct *mm; member 164 mmdrop(ctx->mm); in userfaultfd_ctx_put() 222 struct mm_struct *mm = ctx->mm; in userfaultfd_huge_must_wait() local 226 VM_BUG_ON(!rwsem_is_locked(&mm->mmap_sem)); in userfaultfd_huge_must_wait() 228 ptep = huge_pte_offset(mm, address, vma_mmu_pagesize(vma)); in userfaultfd_huge_must_wait() 270 struct mm_struct *mm = ctx->mm; in userfaultfd_must_wait() local 278 VM_BUG_ON(!rwsem_is_locked(&mm->mmap_sem)); in userfaultfd_must_wait() 280 pgd = pgd_offset(mm, address); in userfaultfd_must_wait() 340 struct mm_struct *mm = vmf->vma->vm_mm; in handle_userfault() local 367 WARN_ON_ONCE(!rwsem_is_locked(&mm->mmap_sem)); in handle_userfault() [all …]
|
D | binfmt_elf_fdpic.c | 363 current->mm->start_code = 0; in load_elf_fdpic_binary() 364 current->mm->end_code = 0; in load_elf_fdpic_binary() 365 current->mm->start_stack = 0; in load_elf_fdpic_binary() 366 current->mm->start_data = 0; in load_elf_fdpic_binary() 367 current->mm->end_data = 0; in load_elf_fdpic_binary() 368 current->mm->context.exec_fdpic_loadmap = 0; in load_elf_fdpic_binary() 369 current->mm->context.interp_fdpic_loadmap = 0; in load_elf_fdpic_binary() 374 ¤t->mm->start_stack, in load_elf_fdpic_binary() 375 ¤t->mm->start_brk); in load_elf_fdpic_binary() 377 retval = setup_arg_pages(bprm, current->mm->start_stack, in load_elf_fdpic_binary() [all …]
|
D | exec.c | 184 struct mm_struct *mm = current->mm; in acct_arg_size() local 187 if (!mm || !diff) in acct_arg_size() 191 add_mm_counter(mm, MM_ANONPAGES, diff); in acct_arg_size() 216 ret = get_user_pages_remote(current, bprm->mm, pos, 1, gup_flags, in get_arg_page() 291 struct mm_struct *mm = bprm->mm; in __bprm_mm_init() local 297 if (down_write_killable(&mm->mmap_sem)) { in __bprm_mm_init() 301 vma->vm_mm = mm; in __bprm_mm_init() 316 err = insert_vm_struct(mm, vma); in __bprm_mm_init() 320 mm->stack_vm = mm->total_vm = 1; in __bprm_mm_init() 321 arch_bprm_mm_init(mm, vma); in __bprm_mm_init() [all …]
|
D | binfmt_flat.c | 119 sp = (unsigned long __user *)current->mm->start_stack; in create_flat_tables() 126 current->mm->start_stack = (unsigned long)sp & -FLAT_STACK_ALIGN; in create_flat_tables() 127 sp = (unsigned long __user *)current->mm->start_stack; in create_flat_tables() 138 current->mm->arg_start = (unsigned long)p; in create_flat_tables() 147 current->mm->arg_end = (unsigned long)p; in create_flat_tables() 149 current->mm->env_start = (unsigned long) p; in create_flat_tables() 158 current->mm->env_end = (unsigned long)p; in create_flat_tables() 380 ptr = (unsigned long __user *)(current->mm->start_code + r.reloc.offset); in old_reloc() 382 ptr = (unsigned long __user *)(current->mm->start_data + r.reloc.offset); in old_reloc() 392 val += current->mm->start_code; in old_reloc() [all …]
|
D | coredump.c | 161 exe_file = get_mm_exe_file(current->mm); in cn_print_exe_file() 324 if (t != current && t->mm) { in zap_process() 334 static int zap_threads(struct task_struct *tsk, struct mm_struct *mm, in zap_threads() argument 343 mm->core_state = core_state; in zap_threads() 353 if (atomic_read(&mm->mm_users) == nr + 1) in zap_threads() 393 if (unlikely(!p->mm)) in zap_threads() 395 if (unlikely(p->mm == mm)) { in zap_threads() 413 struct mm_struct *mm = tsk->mm; in coredump_wait() local 420 if (down_write_killable(&mm->mmap_sem)) in coredump_wait() 423 if (!mm->core_state) in coredump_wait() [all …]
|
D | binfmt_aout.c | 172 current->mm->arg_start = (unsigned long) p; in create_aout_tables() 181 current->mm->arg_end = current->mm->env_start = (unsigned long) p; in create_aout_tables() 190 current->mm->env_end = (unsigned long) p; in create_aout_tables() 248 current->mm->end_code = ex.a_text + in load_aout_binary() 249 (current->mm->start_code = N_TXTADDR(ex)); in load_aout_binary() 250 current->mm->end_data = ex.a_data + in load_aout_binary() 251 (current->mm->start_data = N_DATADDR(ex)); in load_aout_binary() 252 current->mm->brk = ex.a_bss + in load_aout_binary() 253 (current->mm->start_brk = N_BSSADDR(ex)); in load_aout_binary() 324 retval = set_brk(current->mm->start_brk, current->mm->brk); in load_aout_binary() [all …]
|
D | aio.c | 324 struct mm_struct *mm = vma->vm_mm; in aio_ring_mremap() local 328 spin_lock(&mm->ioctx_lock); in aio_ring_mremap() 330 table = rcu_dereference(mm->ioctx_table); in aio_ring_mremap() 345 spin_unlock(&mm->ioctx_lock); in aio_ring_mremap() 457 struct mm_struct *mm = current->mm; in aio_setup_ring() local 516 if (down_write_killable(&mm->mmap_sem)) { in aio_setup_ring() 525 up_write(&mm->mmap_sem); in aio_setup_ring() 657 static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) in ioctx_add_table() argument 663 spin_lock(&mm->ioctx_lock); in ioctx_add_table() 664 table = rcu_dereference_raw(mm->ioctx_table); in ioctx_add_table() [all …]
|
D | binfmt_elf.c | 113 current->mm->start_brk = current->mm->brk = end; in set_brk() 225 elf_info = (elf_addr_t *)current->mm->saved_auxv; in create_elf_tables() 275 sizeof current->mm->saved_auxv - ei_index * sizeof elf_info[0]); in create_elf_tables() 298 vma = find_extend_vma(current->mm, bprm->p); in create_elf_tables() 307 p = current->mm->arg_end = current->mm->arg_start; in create_elf_tables() 319 current->mm->arg_end = p; in create_elf_tables() 322 current->mm->env_end = current->mm->env_start = p; in create_elf_tables() 334 current->mm->env_end = p; in create_elf_tables() 878 current->mm->start_stack = bprm->p; in load_elf_binary() 1112 current->mm->end_code = end_code; in load_elf_binary() [all …]
|
/fs/ramfs/ |
D | file-mmu.c | 38 return current->mm->get_unmapped_area(file, addr, len, pgoff, flags); in ramfs_mmu_get_unmapped_area()
|
/fs/hugetlbfs/ |
D | inode.c | 198 struct mm_struct *mm = current->mm; in hugetlb_get_unmapped_area() local 216 vma = find_vma(mm, addr); in hugetlb_get_unmapped_area()
|