函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-27 16:07:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__vm_map_pages - maps range of kernel pages into user vma*@vma: user vma to map to*@pages: pointer to array of source kernel pages*@num: number of pages in page array*@offset: user's requested vm_pgoff

函数原型:static int __vm_map_pages(struct vm_area_struct *vma, struct page **pages, unsigned long num, unsigned long offset)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
struct page **pages
unsigned longnum
unsigned longoffset
1532  count等于vma_pages(vma)
1533  uaddr等于Our start address within vm_mm.
1537  如果offset大于等于num则返回:负ENXIO
1541  如果count大于numoffset则返回:负ENXIO
1544 i小于count循环
1545  ret等于vm_insert_page - insert single page into user vma*@vma: user vma to map to*@addr: target user address of this page*@page: source kernel page* This allows drivers to insert individual pages they've allocated* into a user vma.
1546  如果ret小于0则返回:ret
1548  uaddr加等于PAGE_SIZE
1551  返回:0
调用者
名称描述
vm_map_pagesvm_map_pages - maps range of kernel pages starts with non zero offset*@vma: user vma to map to*@pages: pointer to array of source kernel pages*@num: number of pages in page array* Maps an object consisting of @num pages, catering for the user's* requested
vm_map_pages_zerovm_map_pages_zero - map range of kernel pages starts with zero offset*@vma: user vma to map to*@pages: pointer to array of source kernel pages*@num: number of pages in page array* Similar to vm_map_pages(), except that it explicitly sets the offset* to 0