函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Do a chunk of "sys_mincore()". We've already checked* all the arguments, we hold the mmap semaphore: we should* just return the amount of info we're asked for.

函数原型:static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *vec)

返回类型:long

参数:

类型参数名称
unsigned longaddr
unsigned longpages
unsigned char *vec
213  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
214  如果非vmaaddr小于Our start address within vm_mm. 则返回:负ENOMEM
216  end等于两数取小(The first byte after our end addresswithin vm_mm. , addr + (pages << PAGE_SHIFT determines the page size ))
217  如果非can_do_mincore(vma)则
218  pages等于DIV_ROUND_UP(end - addr, PAGE_SIZE)
219  memset(vec, 1, pages)
220  返回:pages
222  err等于walk_page_range(The address space we belong to. , addr, end, & mincore_walk_ops, vec)
223  如果err小于0则返回:err
225  返回:endaddr右移PAGE_SHIFT determines the page size
调用者
名称描述
SYSCALL_DEFINE3The mincore(2) system call