函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr, void *kaddr, unsigned long size)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longuaddr
void *kaddr
unsigned longsize
3065  size等于 align the pointer to the (next) page boundary (size)
3067  如果非st whether an address (unsigned long or pointer) is aligned to PAGE_SIZE (uaddr)或非st whether an address (unsigned long or pointer) is aligned to PAGE_SIZE (kaddr)则返回:负EINVAL
3070  area等于d_vm_area - find a continuous kernel virtual area*@addr: base address* Search for the kernel VM area starting at @addr, and return it
3071  如果非area则返回:负EINVAL
3074  如果非flags按位与suitable for remap_vmalloc_range 按位或dma_alloc_coherent 的值的值则返回:负EINVAL
3077  如果kaddrsize大于addrLowlevel-APIs (not for driver use!)则返回:负EINVAL
3080  循环
3081  page等于Walk a vmap address to the struct page it maps.
3084  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.
3085  如果ret则返回:ret
3088  uaddr加等于PAGE_SIZE
3089  kaddr加等于PAGE_SIZE
3090  size减等于PAGE_SIZE
3091 size大于0循环
3093  Flags, see mm.h. 或等于Cannot expand with mremap() 按位或Do not include in the core dump
3095  返回:0
调用者
名称描述
remap_vmalloc_rangemap_vmalloc_range - map vmalloc pages to userspace*@vma: vma to cover (map full range of vma)*@addr: vmalloc memory*@pgoff: number of pages into addr before first page to map* Returns: 0 for success, -Exxx on failure* This function checks that addr is a