Home
last modified time | relevance | path

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

12

/kernel/
Dfork.c490 struct vm_area_struct *vm_area_alloc(struct mm_struct *mm) in vm_area_alloc() argument
498 vma_init(vma, mm); in vm_area_alloc()
640 static void dup_mm_exe_file(struct mm_struct *mm, struct mm_struct *oldmm) in dup_mm_exe_file() argument
645 RCU_INIT_POINTER(mm->exe_file, exe_file); in dup_mm_exe_file()
655 static __latent_entropy int dup_mmap(struct mm_struct *mm, in dup_mmap() argument
662 MA_STATE(mas, &mm->mm_mt, 0, 0); in dup_mmap()
670 uprobe_dup_mmap(oldmm, mm); in dup_mmap()
674 mmap_write_lock_nested(mm, SINGLE_DEPTH_NESTING); in dup_mmap()
677 dup_mm_exe_file(mm, oldmm); in dup_mmap()
679 mm->total_vm = oldmm->total_vm; in dup_mmap()
[all …]
Dsys.c1843 struct mm_struct *mm = get_task_mm(p); in getrusage() local
1845 if (mm) { in getrusage()
1846 setmax_mm_hiwater_rss(&maxrss, mm); in getrusage()
1847 mmput(mm); in getrusage()
1885 static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd) in prctl_set_mm_exe_file() argument
1910 err = replace_mm_exe_file(mm, exe.file); in prctl_set_mm_exe_file()
1988 struct mm_struct *mm = current->mm; in prctl_set_mm_map() local
1991 BUILD_BUG_ON(sizeof(user_auxv) != sizeof(mm->saved_auxv)); in prctl_set_mm_map()
2013 prctl_map.auxv_size > sizeof(mm->saved_auxv)) in prctl_set_mm_map()
2039 error = prctl_set_mm_exe_file(mm, prctl_map.exe_fd); in prctl_set_mm_map()
[all …]
Dtsacct.c93 struct mm_struct *mm; in xacct_add_tsk() local
100 mm = get_task_mm(p); in xacct_add_tsk()
101 if (mm) { in xacct_add_tsk()
103 stats->hiwater_rss = get_mm_hiwater_rss(mm) * PAGE_SIZE / KB; in xacct_add_tsk()
104 stats->hiwater_vm = get_mm_hiwater_vm(mm) * PAGE_SIZE / KB; in xacct_add_tsk()
105 mmput(mm); in xacct_add_tsk()
129 if (!likely(tsk->mm)) in __acct_update_integrals()
144 tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm) >> 10; in __acct_update_integrals()
145 tsk->acct_vm_mem1 += delta * READ_ONCE(tsk->mm->total_vm) >> 10; in __acct_update_integrals()
Dexit.c444 void mm_update_next_owner(struct mm_struct *mm) in mm_update_next_owner() argument
453 if (mm->owner != p) in mm_update_next_owner()
460 if (atomic_read(&mm->mm_users) <= 1) { in mm_update_next_owner()
461 WRITE_ONCE(mm->owner, NULL); in mm_update_next_owner()
470 if (c->mm == mm) in mm_update_next_owner()
478 if (c->mm == mm) in mm_update_next_owner()
489 if (c->mm == mm) in mm_update_next_owner()
491 if (c->mm) in mm_update_next_owner()
501 WRITE_ONCE(mm->owner, NULL); in mm_update_next_owner()
517 if (c->mm != mm) { in mm_update_next_owner()
[all …]
Dptrace.c46 struct mm_struct *mm; in ptrace_access_vm() local
49 mm = get_task_mm(tsk); in ptrace_access_vm()
50 if (!mm) in ptrace_access_vm()
55 ((get_dumpable(mm) != SUID_DUMP_USER) && in ptrace_access_vm()
56 !ptracer_capable(tsk, mm->user_ns))) { in ptrace_access_vm()
57 mmput(mm); in ptrace_access_vm()
61 ret = __access_remote_vm(mm, addr, buf, len, gup_flags); in ptrace_access_vm()
62 mmput(mm); in ptrace_access_vm()
289 struct mm_struct *mm; in __ptrace_may_access() local
350 mm = task->mm; in __ptrace_may_access()
[all …]
Dkthread.c1417 void kthread_use_mm(struct mm_struct *mm) in kthread_use_mm() argument
1423 WARN_ON_ONCE(tsk->mm); in kthread_use_mm()
1429 if (active_mm != mm) { in kthread_use_mm()
1430 mmgrab(mm); in kthread_use_mm()
1431 tsk->active_mm = mm; in kthread_use_mm()
1433 tsk->mm = mm; in kthread_use_mm()
1434 membarrier_update_current_mm(mm); in kthread_use_mm()
1435 switch_mm_irqs_off(active_mm, mm, tsk); in kthread_use_mm()
1451 if (active_mm != mm) in kthread_use_mm()
1462 void kthread_unuse_mm(struct mm_struct *mm) in kthread_unuse_mm() argument
[all …]
Dacct.c559 if (group_dead && current->mm) { in acct_collect()
560 struct mm_struct *mm = current->mm; in acct_collect() local
561 VMA_ITERATOR(vmi, mm, 0); in acct_collect()
564 mmap_read_lock(mm); in acct_collect()
567 mmap_read_unlock(mm); in acct_collect()
Dkcmp.c183 ret = kcmp_ptr(task1->mm, task2->mm, KCMP_VM); in SYSCALL_DEFINE5()
Dcpu.c640 struct mm_struct *mm = idle->active_mm; in finish_cpu() local
646 if (mm != &init_mm) in finish_cpu()
648 mmdrop(mm); in finish_cpu()
1004 #define arch_clear_mm_cpumask_cpu(cpu, mm) cpumask_clear_cpu(cpu, mm_cpumask(mm)) argument
1042 arch_clear_mm_cpumask_cpu(cpu, t->mm); in clear_tasks_mm_cpumask()
Daudit_watch.c534 if (!current->mm) in audit_exe_compare()
536 exe_file = get_mm_exe_file(current->mm); in audit_exe_compare()
Dlatencytop.c119 if (!tsk->mm) in account_global_scheduler_latency()
Daudit.c1625 audit_log_d_path_exe(ab, current->mm); /* exe= */ in audit_log_multicast()
2211 struct mm_struct *mm) in audit_log_d_path_exe() argument
2215 if (!mm) in audit_log_d_path_exe()
2218 exe_file = get_mm_exe_file(mm); in audit_log_d_path_exe()
2277 audit_log_d_path_exe(ab, current->mm); in audit_log_task_info()
Dcred.c475 if (task->mm) in commit_creds()
476 set_dumpable(task->mm, suid_dumpable); in commit_creds()
/kernel/sched/
Dmembarrier.c204 struct mm_struct *mm = (struct mm_struct *) info; in ipi_sync_rq_state() local
206 if (current->mm != mm) in ipi_sync_rq_state()
209 atomic_read(&mm->membarrier_state)); in ipi_sync_rq_state()
219 void membarrier_exec_mmap(struct mm_struct *mm) in membarrier_exec_mmap() argument
227 atomic_set(&mm->membarrier_state, 0); in membarrier_exec_mmap()
290 if (!p->mm) in membarrier_global_expedited()
316 struct mm_struct *mm = current->mm; in membarrier_private_expedited() local
322 if (!(atomic_read(&mm->membarrier_state) & in membarrier_private_expedited()
329 if (!(atomic_read(&mm->membarrier_state) & in membarrier_private_expedited()
335 if (!(atomic_read(&mm->membarrier_state) & in membarrier_private_expedited()
[all …]
Dfair.c1162 rss = get_mm_rss(p->mm); in task_nr_scan_windows()
2382 p->mm->numa_next_scan = jiffies + in update_task_scan_period()
2567 seq = READ_ONCE(p->mm->numa_scan_seq); in task_numa_placement()
2749 if (tsk->mm == current->mm) in task_numa_group()
2849 if (!p->mm) in task_numa_fault()
2927 WRITE_ONCE(p->mm->numa_scan_seq, READ_ONCE(p->mm->numa_scan_seq) + 1); in reset_ptenuma_scan()
2928 p->mm->numa_scan_offset = 0; in reset_ptenuma_scan()
2939 struct mm_struct *mm = p->mm; in task_numa_work() local
2941 MA_STATE(mas, &mm->mm_mt, 0, 0); in task_numa_work()
2961 if (!mm->numa_next_scan) { in task_numa_work()
[all …]
Didle.c371 WARN_ON_ONCE(current->mm); in play_idle_precise()
/kernel/events/
Duprobes.c83 struct mm_struct *mm; member
159 struct mm_struct *mm = vma->vm_mm; in __replace_page() local
164 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, mm, addr, in __replace_page()
189 dec_mm_counter(mm, MM_ANONPAGES); in __replace_page()
192 dec_mm_counter(mm, mm_counter_file(old_page)); in __replace_page()
193 inc_mm_counter(mm, MM_ANONPAGES); in __replace_page()
199 set_pte_at_notify(mm, addr, pvmw.pte, in __replace_page()
283 delayed_uprobe_check(struct uprobe *uprobe, struct mm_struct *mm) in delayed_uprobe_check() argument
288 if (du->uprobe == uprobe && du->mm == mm) in delayed_uprobe_check()
293 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/
Dmmap_unlock_work.h12 struct mm_struct *mm; member
49 static inline void bpf_mmap_unlock_mm(struct mmap_unlock_irq_work *work, struct mm_struct *mm) in bpf_mmap_unlock_mm() argument
52 mmap_read_unlock(mm); in bpf_mmap_unlock_mm()
54 work->mm = mm; in bpf_mmap_unlock_mm()
60 rwsem_release(&mm->mmap_lock.dep_map, _RET_IP_); in bpf_mmap_unlock_mm()
Dtask_iter.c441 struct mm_struct *mm; member
472 curr_mm = info->mm; in task_vma_seq_get_next()
584 info->mm = curr_mm; in task_vma_seq_get_next()
593 info->mm = NULL; in task_vma_seq_get_next()
602 info->mm = NULL; in task_vma_seq_get_next()
674 mmap_read_unlock(info->mm); in task_vma_seq_stop()
675 mmput(info->mm); in task_vma_seq_stop()
676 info->mm = NULL; in task_vma_seq_stop()
786 struct mm_struct *mm; in BPF_CALL_5() local
795 mm = task->mm; in BPF_CALL_5()
[all …]
Dstackmap.c140 if (!user || !current || !current->mm || irq_work_busy || in stack_map_get_build_id_offset()
141 !mmap_read_trylock(current->mm)) { in stack_map_get_build_id_offset()
158 vma = find_vma(current->mm, ips[i]); in stack_map_get_build_id_offset()
173 bpf_mmap_unlock_mm(work, current->mm); in stack_map_get_build_id_offset()
/kernel/futex/
Dcore.c225 struct mm_struct *mm = current->mm; in get_futex_key() local
259 key->private.mm = mm; in get_futex_key()
261 key->private.mm = NULL; in get_futex_key()
363 key->private.mm = mm; in get_futex_key()
422 struct mm_struct *mm = current->mm; in fault_in_user_writeable() local
425 mmap_read_lock(mm); in fault_in_user_writeable()
426 ret = fixup_user_fault(mm, (unsigned long)uaddr, in fault_in_user_writeable()
428 mmap_read_unlock(mm); in fault_in_user_writeable()
/kernel/cgroup/
Dcpuset.c1948 struct mm_struct *mm; member
1959 do_migrate_pages(mwork->mm, &mwork->from, &mwork->to, MPOL_MF_MOVE_ALL); in cpuset_migrate_mm_workfn()
1960 mmput(mwork->mm); in cpuset_migrate_mm_workfn()
1964 static void cpuset_migrate_mm(struct mm_struct *mm, const nodemask_t *from, in cpuset_migrate_mm() argument
1970 mmput(mm); in cpuset_migrate_mm()
1976 mwork->mm = mm; in cpuset_migrate_mm()
1982 mmput(mm); in cpuset_migrate_mm()
2051 struct mm_struct *mm; in update_tasks_nodemask() local
2056 mm = get_task_mm(task); in update_tasks_nodemask()
2057 if (!mm) in update_tasks_nodemask()
[all …]
/kernel/trace/
Dtrace_output.c384 static int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm, in seq_print_user_ip() argument
394 if (mm) { in seq_print_user_ip()
397 mmap_read_lock(mm); in seq_print_user_ip()
398 vma = find_vma(mm, ip); in seq_print_user_ip()
409 mmap_read_unlock(mm); in seq_print_user_ip()
1128 struct mm_struct *mm = NULL; in trace_user_stack_print() local
1144 mm = get_task_mm(task); in trace_user_stack_print()
1155 seq_print_user_ip(s, mm, ip, flags); in trace_user_stack_print()
1159 if (mm) in trace_user_stack_print()
1160 mmput(mm); in trace_user_stack_print()
Dtrace_uprobe.c1056 struct mm_struct *mm);
1202 __uprobe_perf_filter(struct trace_uprobe_filter *filter, struct mm_struct *mm) in __uprobe_perf_filter() argument
1210 if (event->hw.target->mm == mm) in __uprobe_perf_filter()
1221 return __uprobe_perf_filter(filter, event->hw.target->mm); in trace_uprobe_filter_event()
1324 enum uprobe_filter_ctx ctx, struct mm_struct *mm) in uprobe_perf_filter() argument
1334 ret = __uprobe_perf_filter(filter, mm); in uprobe_perf_filter()
1404 if (!uprobe_perf_filter(&tu->consumer, 0, current->mm)) in uprobe_perf_func()

12