函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-27 09:57:33
Last Modify:2020-03-17 11:04:53 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_task_mm - acquire a reference to the task's mm* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning* this kernel workthread has transiently adopted a user mm with use_mm,* to do its AIO) is not set and if so returns a reference to it, after

函数原型:struct mm_struct *get_task_mm(struct task_struct *task)

返回类型:struct mm_struct

参数:

类型参数名称
struct task_struct *task
1209  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
1210  mm等于内存信息
1211  如果mm
1212  如果任务标志按位与I am a kernel thread mm = NULL
1214  否则mmget() - Pin the address space associated with a &struct mm_struct.*@mm: The address space to pin.* Make sure that the address space of the given &struct mm_struct doesn't* go away. This does not protect against parts of the address space being
1217  task_unlock(task)
1218  返回:mm
调用者
名称描述
mm_access
ptrace_access_vmAccess another process' address space via ptrace.* Source/target buffer must be kernel space,* Do not walk the page table directly, use get_user_pages
getrusage
update_tasks_nodemaskpdate_tasks_nodemask - Update the nodemasks of tasks in the cpuset.*@cs: the cpuset in which each task's mems_allowed mask needs to be changed* Iterate through each task of @cs updating its mems_allowed to the* effective cpuset's
cpuset_attach
trace_user_stack_printTRACE_USER_STACK
perf_event_addr_filters_applyUpdate event's address range filters based on the* task's existing mappings, if any.
access_process_vmAccess another process' address space.* - source/target buffer must be kernel space
access_process_vmAccess another process' address space.* Source/target buffer must be kernel space,* Do not walk the page table directly, use get_user_pages
kernel_migrate_pages
kernel_move_pagesMove a list of pages in the address space of the currently executing* process.
mem_cgroup_can_attach
get_cmdlineget_cmdline() - copy the cmdline value to a buffer.*@task: the task whose cmdline value to copy.*@buffer: the buffer to copy to.*@buflen: the length of the buffer. Larger cmdline values are truncated* to this length.