函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:int vm_insert_page(struct vm_area_struct *vma, unsigned long addr, struct page *page)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
struct page *page
1505  如果addr小于Our start address within vm_mm. addr大于等于The first byte after our end addresswithin vm_mm. 则返回:负EFAULT
1507  如果非page_count(page)则返回:负EINVAL
1509  如果非Flags, see mm.h. 按位与Can contain "struct page" and pure PFN pages 的值则
1510  BUG_ON(rylock for reading -- returns 1 if successful, 0 if contention)
1511  BUG_ON(Flags, see mm.h. & Page-ranges managed without "struct page", just pure PFN )
1512  Flags, see mm.h. 或等于Can contain "struct page" and pure PFN pages
1514  返回:This is the old fallback for page remapping.* For historical reasons, it only allows reserved pages. Only* old drivers should use this, and they needed to mark their* pages reserved for the old functions anyway.
调用者
名称描述
__vm_map_pages__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
remap_vmalloc_range_partialmap_vmalloc_range_partial - map vmalloc pages to userspace*@vma: vma to cover*@uaddr: target user address to start at*@kaddr: virtual address of vmalloc kernel memory*@size: size of map area* Returns: 0 for success, -Exxx on failure* This function checks
kcov_mmap
vmf_insert_page