Home
last modified time | relevance | path

Searched refs:mm (Results 1 – 15 of 15) sorted by relevance

/fs/proc/
Dtask_nommu.c18 void task_mem(struct seq_file *m, struct mm_struct *mm) in task_mem() argument
25 down_read(&mm->mmap_sem); in task_mem()
26 for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) { in task_mem()
39 if (atomic_read(&mm->mm_count) > 1 || in task_mem()
49 if (atomic_read(&mm->mm_count) > 1) in task_mem()
50 sbytes += kobjsize(mm); in task_mem()
52 bytes += kobjsize(mm); in task_mem()
77 up_read(&mm->mmap_sem); in task_mem()
80 unsigned long task_vsize(struct mm_struct *mm) in task_vsize() argument
86 down_read(&mm->mmap_sem); in task_vsize()
[all …]
Dtask_mmu.c20 void task_mem(struct seq_file *m, struct mm_struct *mm) in task_mem() argument
32 hiwater_vm = total_vm = mm->total_vm; in task_mem()
33 if (hiwater_vm < mm->hiwater_vm) in task_mem()
34 hiwater_vm = mm->hiwater_vm; in task_mem()
35 hiwater_rss = total_rss = get_mm_rss(mm); in task_mem()
36 if (hiwater_rss < mm->hiwater_rss) in task_mem()
37 hiwater_rss = mm->hiwater_rss; in task_mem()
39 data = mm->total_vm - mm->shared_vm - mm->stack_vm; in task_mem()
40 text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10; in task_mem()
41 lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text; in task_mem()
[all …]
Darray.c372 struct mm_struct *mm = get_task_mm(task); in proc_pid_status() local
377 if (mm) { in proc_pid_status()
378 task_mem(m, mm); in proc_pid_status()
379 mmput(mm); in proc_pid_status()
401 struct mm_struct *mm; in do_task_stat() local
414 mm = get_task_mm(task); in do_task_stat()
415 if (mm) { in do_task_stat()
416 vsize = task_vsize(mm); in do_task_stat()
516 seq_put_decimal_ull(m, ' ', mm ? get_mm_rss(mm) : 0); in do_task_stat()
518 seq_put_decimal_ull(m, ' ', mm ? (permitted ? mm->start_code : 1) : 0); in do_task_stat()
[all …]
Dbase.c207 struct mm_struct *mm = get_task_mm(task); in proc_pid_cmdline() local
208 if (!mm) in proc_pid_cmdline()
210 if (!mm->arg_end) in proc_pid_cmdline()
213 len = mm->arg_end - mm->arg_start; in proc_pid_cmdline()
218 res = access_process_vm(task, mm->arg_start, buffer, len, 0); in proc_pid_cmdline()
227 len = mm->env_end - mm->env_start; in proc_pid_cmdline()
230 res += access_process_vm(task, mm->env_start, buffer+res, len, 0); in proc_pid_cmdline()
235 mmput(mm); in proc_pid_cmdline()
242 struct mm_struct *mm = mm_access(task, PTRACE_MODE_READ); in proc_pid_auxv() local
243 int res = PTR_ERR(mm); in proc_pid_auxv()
[all …]
Dinternal.h103 struct mm_struct *mm; in task_dumpable() local
106 mm = task->mm; in task_dumpable()
107 if (mm) in task_dumpable()
108 dumpable = get_dumpable(mm); in task_dumpable()
/fs/
Dexec.c169 struct mm_struct *mm = current->mm; in acct_arg_size() local
172 if (!mm || !diff) in acct_arg_size()
176 add_mm_counter(mm, MM_ANONPAGES, diff); in acct_arg_size()
192 ret = get_user_pages(current, bprm->mm, pos, in get_arg_page()
250 struct mm_struct *mm = bprm->mm; in __bprm_mm_init() local
256 down_write(&mm->mmap_sem); in __bprm_mm_init()
257 vma->vm_mm = mm; in __bprm_mm_init()
272 err = insert_vm_struct(mm, vma); in __bprm_mm_init()
276 mm->stack_vm = mm->total_vm = 1; in __bprm_mm_init()
277 up_write(&mm->mmap_sem); in __bprm_mm_init()
[all …]
Dbinfmt_som.c91 p = current->mm->arg_start; in create_som_tables()
97 current->mm->arg_end = current->mm->env_start = p; in create_som_tables()
103 current->mm->env_end = p; in create_som_tables()
148 current->mm->start_code = code_start; in map_som_binary()
149 current->mm->end_code = code_start + code_size; in map_som_binary()
157 current->mm->start_data = data_start; in map_som_binary()
158 current->mm->end_data = bss_start = data_start + data_size; in map_som_binary()
166 current->mm->start_brk = current->mm->brk = som_brk; in map_som_binary()
251 current->mm->start_stack = bprm->p; in load_som_binary()
254 printk("(start_brk) %08lx\n" , (unsigned long) current->mm->start_brk); in load_som_binary()
[all …]
Dbinfmt_elf_fdpic.c330 current->mm->start_code = 0; in load_elf_fdpic_binary()
331 current->mm->end_code = 0; in load_elf_fdpic_binary()
332 current->mm->start_stack = 0; in load_elf_fdpic_binary()
333 current->mm->start_data = 0; in load_elf_fdpic_binary()
334 current->mm->end_data = 0; in load_elf_fdpic_binary()
335 current->mm->context.exec_fdpic_loadmap = 0; in load_elf_fdpic_binary()
336 current->mm->context.interp_fdpic_loadmap = 0; in load_elf_fdpic_binary()
341 &current->mm->start_stack, in load_elf_fdpic_binary()
342 &current->mm->start_brk); in load_elf_fdpic_binary()
344 retval = setup_arg_pages(bprm, current->mm->start_stack, in load_elf_fdpic_binary()
[all …]
Dcoredump.c117 exe_file = get_mm_exe_file(current->mm); in cn_print_exe_file()
272 if (t != current && t->mm) { in zap_process()
282 static int zap_threads(struct task_struct *tsk, struct mm_struct *mm, in zap_threads() argument
291 mm->core_state = core_state; in zap_threads()
303 if (atomic_read(&mm->mm_users) == nr + 1) in zap_threads()
343 if (p->mm) { in zap_threads()
344 if (unlikely(p->mm == mm)) { in zap_threads()
363 struct mm_struct *mm = tsk->mm; in coredump_wait() local
370 down_write(&mm->mmap_sem); in coredump_wait()
371 if (!mm->core_state) in coredump_wait()
[all …]
Dbinfmt_aout.c176 current->mm->arg_start = (unsigned long) p; in create_aout_tables()
185 current->mm->arg_end = current->mm->env_start = (unsigned long) p; in create_aout_tables()
194 current->mm->env_end = (unsigned long) p; in create_aout_tables()
252 current->mm->end_code = ex.a_text + in load_aout_binary()
253 (current->mm->start_code = N_TXTADDR(ex)); in load_aout_binary()
254 current->mm->end_data = ex.a_data + in load_aout_binary()
255 (current->mm->start_data = N_DATADDR(ex)); in load_aout_binary()
256 current->mm->brk = ex.a_bss + in load_aout_binary()
257 (current->mm->start_brk = N_BSSADDR(ex)); in load_aout_binary()
258 current->mm->free_area_cache = current->mm->mmap_base; in load_aout_binary()
[all …]
Dbinfmt_flat.c144 current->mm->arg_start = (unsigned long) p; in create_flat_tables()
152 current->mm->arg_end = current->mm->env_start = (unsigned long) p; in create_flat_tables()
160 current->mm->env_end = (unsigned long) p; in create_flat_tables()
393 ptr = (unsigned long *) (current->mm->start_code + r.reloc.offset); in old_reloc()
395 ptr = (unsigned long *) (current->mm->start_data + r.reloc.offset); in old_reloc()
406 *ptr += current->mm->start_code; in old_reloc()
409 *ptr += current->mm->start_data; in old_reloc()
412 *ptr += current->mm->end_data; in old_reloc()
671 current->mm->start_code = start_code; in load_flat_file()
672 current->mm->end_code = end_code; in load_flat_file()
[all …]
Dbinfmt_elf.c97 current->mm->start_brk = current->mm->brk = end; in set_brk()
211 elf_info = (elf_addr_t *)current->mm->saved_auxv; in create_elf_tables()
261 sizeof current->mm->saved_auxv - ei_index * sizeof elf_info[0]); in create_elf_tables()
284 vma = find_extend_vma(current->mm, bprm->p); in create_elf_tables()
295 p = current->mm->arg_end = current->mm->arg_start; in create_elf_tables()
307 current->mm->arg_end = current->mm->env_start = p; in create_elf_tables()
319 current->mm->env_end = p; in create_elf_tables()
838 current->mm->def_flags = def_flags; in load_elf_binary()
853 current->mm->free_area_cache = current->mm->mmap_base; in load_elf_binary()
854 current->mm->cached_hole_size = 0; in load_elf_binary()
[all …]
Daio.c152 struct mm_struct *mm = current->mm; in aio_setup_ring() local
179 down_write(&mm->mmap_sem); in aio_setup_ring()
184 up_write(&mm->mmap_sem); in aio_setup_ring()
191 ctx->nr_pages = get_user_pages(current, mm, ctx->mmap_base, nr_pages, in aio_setup_ring()
193 up_write(&mm->mmap_sem); in aio_setup_ring()
345 struct mm_struct *mm = current->mm; in ioctx_alloc() local
388 spin_lock(&mm->ioctx_lock); in ioctx_alloc()
389 hlist_add_head_rcu(&ctx->list, &mm->ioctx_list); in ioctx_alloc()
390 spin_unlock(&mm->ioctx_lock); in ioctx_alloc()
393 ctx, ctx->user_id, mm, ctx->nr_events); in ioctx_alloc()
[all …]
/fs/nfs/
Ddirect.c341 down_read(&current->mm->mmap_sem); in nfs_direct_read_schedule_segment()
342 result = get_user_pages(current, current->mm, user_addr, in nfs_direct_read_schedule_segment()
344 up_read(&current->mm->mmap_sem); in nfs_direct_read_schedule_segment()
662 down_read(&current->mm->mmap_sem); in nfs_direct_write_schedule_segment()
663 result = get_user_pages(current, current->mm, user_addr, in nfs_direct_write_schedule_segment()
665 up_read(&current->mm->mmap_sem); in nfs_direct_write_schedule_segment()
/fs/hugetlbfs/
Dinode.c152 struct mm_struct *mm = current->mm; in hugetlb_get_unmapped_area() local
170 vma = find_vma(mm, addr); in hugetlb_get_unmapped_area()