Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\memory.c Create Date:2022-07-28 14:41:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__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

Proto:static int __vm_map_pages(struct vm_area_struct *vma, struct page **pages, unsigned long num, unsigned long offset)

Type:int

Parameter:

TypeParameterName
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  If offset >= num Then Return -ENXIO
1541  If count > num - offset Then Return -ENXIO
1544  When i < count cycle
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  If ret < 0 Then Return ret
1548  uaddr += PAGE_SIZE
1551  Return 0
Caller
NameDescribe
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