函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:small helper routine , copy contents to buf from addr.* If the page is not present, fill zero.

函数原型:static int aligned_vread(char *buf, char *addr, unsigned long count)

返回类型:int

参数:

类型参数名称
char *buf
char *addr
unsigned longcount
2818  copied等于0
2820 count循环
2823  offset等于offset_in_page(addr)
2824  length等于PAGE_SIZEoffset
2825  如果length大于countlength等于count
2827  p等于Walk a vmap address to the struct page it maps.
2835  如果p
2840  map等于kmap_atomic(p)
2843  否则memset(buf, 0, length)
2846  addr加等于length
2847  buf加等于length
2848  copied加等于length
2849  count减等于length
2851  返回:copied
调用者
名称描述
vreadvread() - read vmalloc area in a safe way.*@buf: buffer for reading data*@addr: vm address.*@count: number of bytes to be read.* This function checks that addr is a valid vmalloc'ed area, and* copy data from that area to a given buffer