函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:The mincore(2) system call

函数原型:SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len, unsigned char __user *, vec)

返回类型:

参数:

259  start等于Architectures that support memory tagging (assigning tags to memory regions,* embedding these tags into addresses that point to these memory regions, and* checking that the memory and the pointer tags match on memory accesses)(start)
262  如果start按位与PAGE_MASK的反则返回:负EINVAL
266  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.((void__user * )start, len)则返回:负ENOMEM
270  pages等于len右移PAGE_SHIFT determines the page size
271  pages加等于offset_in_page(len)不等于0
273  如果非access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(vec, pages)则返回:负EFAULT
276  tmp等于__get_free_page(GFP_USER)
277  如果非tmp则返回:负EAGAIN
280  retval等于0
281 pages循环
286  lock for reading
287  retval等于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.
288  lease a read lock
290  如果retval小于等于0则退出
292  如果copy_to_user(vec, tmp, retval)则
293  retval等于负EFAULT
294  退出
296  pages减等于retval
297  vec加等于retval
298  start加等于retval左移PAGE_SHIFT determines the page size
299  retval等于0
301  free_page((unsignedlong)tmp)
302  返回:retval