函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\migrate.c Create Date:2022-07-27 17:33:53
Last Modify:2022-05-20 09:53:13 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Move a list of pages in the address space of the currently executing* process.

函数原型:static int kernel_move_pages(pid_t pid, unsigned long nr_pages, const void __user *__user *pages, const int __user *nodes, int __user *status, int flags)

返回类型:int

参数:

类型参数名称
pid_tpid
unsigned longnr_pages
const void __user *__user *pages
const int __user *nodes
int __user *status
intflags
1793  如果flags按位与Move pages owned by this process to conformto policy 按位或Move every page to conform to policy 的值的反则返回:负EINVAL
1796  如果flags按位与Move every page to conform to policy 且非操作权限检查则返回:负EPERM
1800  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1801  task等于如果pidfind_task_by_vpid(pid)否则当前进程
1802  如果非task
1803  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1804  返回:负ESRCH
1806  get_task_struct(task)
1812  如果非ptrace_may_access(task, PTRACE_MODE_READ_REALCREDS)则
1813  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1814  err等于负EPERM
1815  转到:out
1817  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1819  err等于security_task_movememory(task)
1820  如果err则转到:out
1823  task_nodes等于puset_mems_allowed - return mems_allowed mask from a tasks cpuset.*@tsk: pointer to task_struct from which to obtain cpuset->mems_allowed.* Description: Returns the nodemask_t mems_allowed of the cpuset* attached to the specified @tsk
1824  mm等于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
1825  put_task_struct(task)
1827  如果非mm则返回:负EINVAL
1830  如果nodeserr等于Migrate an array of page address onto an array of nodes and fill* the corresponding array of status.
1833  否则err等于Determine the nodes of a user array of pages and store it in* a user array of status.
1836  Decrement the use count and release all resources for an mm.
1837  返回:err
1839  out :
1840  put_task_struct(task)
1841  返回:err