Home
last modified time | relevance | path

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

12

/kernel/
Dfork.c350 struct vm_area_struct *vm_area_alloc(struct mm_struct *mm) in vm_area_alloc() argument
356 vma_init(vma, mm); in vm_area_alloc()
481 static __latent_entropy int dup_mmap(struct mm_struct *mm, in dup_mmap() argument
496 uprobe_dup_mmap(oldmm, mm); in dup_mmap()
500 mmap_write_lock_nested(mm, SINGLE_DEPTH_NESTING); in dup_mmap()
503 RCU_INIT_POINTER(mm->exe_file, get_mm_exe_file(oldmm)); in dup_mmap()
505 mm->total_vm = oldmm->total_vm; in dup_mmap()
506 mm->data_vm = oldmm->data_vm; in dup_mmap()
507 mm->exec_vm = oldmm->exec_vm; in dup_mmap()
508 mm->stack_vm = oldmm->stack_vm; in dup_mmap()
[all …]
Dsys.c1750 struct mm_struct *mm; in getrusage() local
1820 mm = get_task_mm(p); in getrusage()
1821 if (mm) { in getrusage()
1822 setmax_mm_hiwater_rss(&maxrss, mm); in getrusage()
1823 mmput(mm); in getrusage()
1864 static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd) in prctl_set_mm_exe_file() argument
1893 exe_file = get_mm_exe_file(mm); in prctl_set_mm_exe_file()
1898 mmap_read_lock(mm); in prctl_set_mm_exe_file()
1899 for (vma = mm->mmap; vma; vma = vma->vm_next) { in prctl_set_mm_exe_file()
1907 mmap_read_unlock(mm); in prctl_set_mm_exe_file()
[all …]
Dtsacct.c87 struct mm_struct *mm; in xacct_add_tsk() local
94 mm = get_task_mm(p); in xacct_add_tsk()
95 if (mm) { in xacct_add_tsk()
97 stats->hiwater_rss = get_mm_hiwater_rss(mm) * PAGE_SIZE / KB; in xacct_add_tsk()
98 stats->hiwater_vm = get_mm_hiwater_vm(mm) * PAGE_SIZE / KB; in xacct_add_tsk()
99 mmput(mm); in xacct_add_tsk()
123 if (!likely(tsk->mm)) in __acct_update_integrals()
138 tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm) >> 10; in __acct_update_integrals()
139 tsk->acct_vm_mem1 += delta * tsk->mm->total_vm >> 10; in __acct_update_integrals()
Dexit.c395 void mm_update_next_owner(struct mm_struct *mm) in mm_update_next_owner() argument
404 if (mm->owner != p) in mm_update_next_owner()
411 if (atomic_read(&mm->mm_users) <= 1) { in mm_update_next_owner()
412 WRITE_ONCE(mm->owner, NULL); in mm_update_next_owner()
421 if (c->mm == mm) in mm_update_next_owner()
429 if (c->mm == mm) in mm_update_next_owner()
440 if (c->mm == mm) in mm_update_next_owner()
442 if (c->mm) in mm_update_next_owner()
452 WRITE_ONCE(mm->owner, NULL); in mm_update_next_owner()
468 if (c->mm != mm) { in mm_update_next_owner()
[all …]
Dptrace.c45 struct mm_struct *mm; in ptrace_access_vm() local
48 mm = get_task_mm(tsk); in ptrace_access_vm()
49 if (!mm) in ptrace_access_vm()
54 ((get_dumpable(mm) != SUID_DUMP_USER) && in ptrace_access_vm()
55 !ptracer_capable(tsk, mm->user_ns))) { in ptrace_access_vm()
56 mmput(mm); in ptrace_access_vm()
60 ret = __access_remote_vm(tsk, mm, addr, buf, len, gup_flags); in ptrace_access_vm()
61 mmput(mm); in ptrace_access_vm()
294 struct mm_struct *mm; in __ptrace_may_access() local
355 mm = task->mm; in __ptrace_may_access()
[all …]
Dkthread.c1330 void kthread_use_mm(struct mm_struct *mm) in kthread_use_mm() argument
1336 WARN_ON_ONCE(tsk->mm); in kthread_use_mm()
1342 if (active_mm != mm) { in kthread_use_mm()
1343 mmgrab(mm); in kthread_use_mm()
1344 tsk->active_mm = mm; in kthread_use_mm()
1346 tsk->mm = mm; in kthread_use_mm()
1347 switch_mm_irqs_off(active_mm, mm, tsk); in kthread_use_mm()
1354 if (active_mm != mm) in kthread_use_mm()
1365 void kthread_unuse_mm(struct mm_struct *mm) in kthread_unuse_mm() argument
1370 WARN_ON_ONCE(!tsk->mm); in kthread_unuse_mm()
[all …]
Dacct.c543 if (group_dead && current->mm) { in acct_collect()
546 mmap_read_lock(current->mm); in acct_collect()
547 vma = current->mm->mmap; in acct_collect()
552 mmap_read_unlock(current->mm); in acct_collect()
Dkcmp.c200 ret = kcmp_ptr(task1->mm, task2->mm, KCMP_VM); in SYSCALL_DEFINE5()
Dcontext_tracking.c65 WARN_ON_ONCE(!current->mm); in __context_tracking_enter()
Daudit_watch.c534 if (!current->mm) in audit_exe_compare()
536 exe_file = get_mm_exe_file(current->mm); in audit_exe_compare()
Dcpu.c588 struct mm_struct *mm = idle->active_mm; in finish_cpu() local
594 if (mm != &init_mm) in finish_cpu()
596 mmdrop(mm); in finish_cpu()
882 #define arch_clear_mm_cpumask_cpu(cpu, mm) cpumask_clear_cpu(cpu, mm_cpumask(mm)) argument
920 arch_clear_mm_cpumask_cpu(cpu, t->mm); in clear_tasks_mm_cpumask()
Dlatencytop.c93 if (!tsk->mm) in account_global_scheduler_latency()
Daudit.c1627 audit_log_d_path_exe(ab, current->mm); /* exe= */ in audit_log_multicast()
2210 struct mm_struct *mm) in audit_log_d_path_exe() argument
2214 if (!mm) in audit_log_d_path_exe()
2217 exe_file = get_mm_exe_file(mm); in audit_log_d_path_exe()
2276 audit_log_d_path_exe(ab, current->mm); in audit_log_task_info()
Dcred.c465 if (task->mm) in commit_creds()
466 set_dumpable(task->mm, suid_dumpable); in commit_creds()
Daudit.h248 struct mm_struct *mm);
/kernel/sched/
Dmembarrier.c76 struct mm_struct *mm = (struct mm_struct *) info; in ipi_sync_rq_state() local
78 if (current->mm != mm) in ipi_sync_rq_state()
81 atomic_read(&mm->membarrier_state)); in ipi_sync_rq_state()
91 void membarrier_exec_mmap(struct mm_struct *mm) in membarrier_exec_mmap() argument
99 atomic_set(&mm->membarrier_state, 0); in membarrier_exec_mmap()
179 struct mm_struct *mm = current->mm; in membarrier_private_expedited() local
185 if (!(atomic_read(&mm->membarrier_state) & in membarrier_private_expedited()
192 if (!(atomic_read(&mm->membarrier_state) & in membarrier_private_expedited()
198 if (!(atomic_read(&mm->membarrier_state) & in membarrier_private_expedited()
204 (atomic_read(&mm->mm_users) == 1 || num_online_cpus() == 1)) in membarrier_private_expedited()
[all …]
Dfair.c1146 rss = get_mm_rss(p->mm); in task_nr_scan_windows()
2205 p->mm->numa_next_scan = jiffies + in update_task_scan_period()
2390 seq = READ_ONCE(p->mm->numa_scan_seq); in task_numa_placement()
2559 if (tsk->mm == current->mm) in task_numa_group()
2659 if (!p->mm) in task_numa_fault()
2728 WRITE_ONCE(p->mm->numa_scan_seq, READ_ONCE(p->mm->numa_scan_seq) + 1); in reset_ptenuma_scan()
2729 p->mm->numa_scan_offset = 0; in reset_ptenuma_scan()
2740 struct mm_struct *mm = p->mm; in task_numa_work() local
2761 if (!mm->numa_next_scan) { in task_numa_work()
2762 mm->numa_next_scan = now + in task_numa_work()
[all …]
Dcore.c2541 if (p->mm && printk_ratelimit()) { in select_fallback_rq()
3840 struct mm_struct *mm = rq->prev_mm; in finish_task_switch() local
3893 if (mm) { in finish_task_switch()
3894 membarrier_mm_sync_core_before_usermode(mm); in finish_task_switch()
3895 mmdrop(mm); in finish_task_switch()
4006 if (!next->mm) { // to kernel in context_switch()
4010 if (prev->mm) // from user in context_switch()
4015 membarrier_switch_mm(rq, prev->active_mm, next->mm); in context_switch()
4024 switch_mm_irqs_off(prev->active_mm, next->mm, next); in context_switch()
4026 if (!prev->mm) { // from kernel in context_switch()
[all …]
/kernel/events/
Duprobes.c83 struct mm_struct *mm; member
157 struct mm_struct *mm = vma->vm_mm; in __replace_page() local
166 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, mm, addr, in __replace_page()
190 dec_mm_counter(mm, MM_ANONPAGES); in __replace_page()
193 dec_mm_counter(mm, mm_counter_file(old_page)); in __replace_page()
194 inc_mm_counter(mm, MM_ANONPAGES); in __replace_page()
200 set_pte_at_notify(mm, addr, pvmw.pte, in __replace_page()
287 delayed_uprobe_check(struct uprobe *uprobe, struct mm_struct *mm) in delayed_uprobe_check() argument
292 if (du->uprobe == uprobe && du->mm == mm) in delayed_uprobe_check()
297 static int delayed_uprobe_add(struct uprobe *uprobe, struct mm_struct *mm) in delayed_uprobe_add() argument
[all …]
Dcallchain.c205 if (current->mm) in get_perf_callchain()
/kernel/bpf/
Dstackmap.c38 struct mm_struct *mm; member
49 mmap_read_unlock_non_owner(work->mm); in do_up_read()
327 if (!user || !current || !current->mm || irq_work_busy || in stack_map_get_build_id_offset()
328 !mmap_read_trylock_non_owner(current->mm)) { in stack_map_get_build_id_offset()
339 vma = find_vma(current->mm, ips[i]); in stack_map_get_build_id_offset()
353 mmap_read_unlock_non_owner(current->mm); in stack_map_get_build_id_offset()
355 work->mm = current->mm; in stack_map_get_build_id_offset()
/kernel/cgroup/
Dcpuset.c1680 struct mm_struct *mm; member
1691 do_migrate_pages(mwork->mm, &mwork->from, &mwork->to, MPOL_MF_MOVE_ALL); in cpuset_migrate_mm_workfn()
1692 mmput(mwork->mm); in cpuset_migrate_mm_workfn()
1696 static void cpuset_migrate_mm(struct mm_struct *mm, const nodemask_t *from, in cpuset_migrate_mm() argument
1703 mwork->mm = mm; in cpuset_migrate_mm()
1709 mmput(mm); in cpuset_migrate_mm()
1778 struct mm_struct *mm; in update_tasks_nodemask() local
1783 mm = get_task_mm(task); in update_tasks_nodemask()
1784 if (!mm) in update_tasks_nodemask()
1789 mpol_rebind_mm(mm, &cs->mems_allowed); in update_tasks_nodemask()
[all …]
/kernel/trace/
Dtrace_output.c383 static int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm, in seq_print_user_ip() argument
393 if (mm) { in seq_print_user_ip()
396 mmap_read_lock(mm); in seq_print_user_ip()
397 vma = find_vma(mm, ip); in seq_print_user_ip()
408 mmap_read_unlock(mm); in seq_print_user_ip()
1101 struct mm_struct *mm = NULL; in trace_user_stack_print() local
1117 mm = get_task_mm(task); in trace_user_stack_print()
1128 seq_print_user_ip(s, mm, ip, flags); in trace_user_stack_print()
1132 if (mm) in trace_user_stack_print()
1133 mmput(mm); in trace_user_stack_print()
Dtrace_uprobe.c1055 struct mm_struct *mm);
1204 __uprobe_perf_filter(struct trace_uprobe_filter *filter, struct mm_struct *mm) in __uprobe_perf_filter() argument
1212 if (event->hw.target->mm == mm) in __uprobe_perf_filter()
1223 return __uprobe_perf_filter(filter, event->hw.target->mm); in trace_uprobe_filter_event()
1328 enum uprobe_filter_ctx ctx, struct mm_struct *mm) in uprobe_perf_filter() argument
1338 ret = __uprobe_perf_filter(filter, mm); in uprobe_perf_filter()
1408 if (!uprobe_perf_filter(&tu->consumer, 0, current->mm)) in uprobe_perf_func()
/kernel/futex/
Dcore.c491 struct mm_struct *mm = current->mm; in get_futex_key() local
525 key->private.mm = mm; in get_futex_key()
527 key->private.mm = NULL; in get_futex_key()
629 key->private.mm = mm; in get_futex_key()
688 struct mm_struct *mm = current->mm; in fault_in_user_writeable() local
691 mmap_read_lock(mm); in fault_in_user_writeable()
692 ret = fixup_user_fault(mm, (unsigned long)uaddr, in fault_in_user_writeable()
694 mmap_read_unlock(mm); in fault_in_user_writeable()

12