函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Determine the nodes of a user array of pages and store it in* a user array of status.

函数原型:static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages, const void __user *__user *pages, int __user *status)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
unsigned longnr_pages
const void __user *__user *pages
int __user *status
1753  __userchunk_pages[16]
1756 nr_pages循环
1759  chunk_nr等于nr_pages
1760  如果chunk_nr大于Determine the nodes of a user array of pages and store it in* a user array of status.chunk_nr等于Determine the nodes of a user array of pages and store it in* a user array of status.
1763  如果copy_from_user(chunk_pages, pages, chunk_nr * chunk_pages的长度)则退出
1766  Determine the nodes of an array of pages and store it in an array of status.
1768  如果copy_to_user(status, chunk_status, chunk_nr * status的长度)则退出
1771  pages加等于chunk_nr
1772  status加等于chunk_nr
1773  nr_pages减等于chunk_nr
1775  返回:如果nr_pages则负EFAULT否则0
调用者
名称描述
kernel_move_pagesMove a list of pages in the address space of the currently executing* process.