函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kcov_mmap

函数原型:static int kcov_mmap(struct file *filep, struct vm_area_struct *vma)

返回类型:int

参数:

类型参数名称
struct file *filep
struct vm_area_struct *vma
444  res等于0
446  kcov等于private_data
450  area等于vmalloc_user(The first byte after our end addresswithin vm_mm. - Our start address within vm_mm. )
451  如果非area则返回:负ENOMEM
454  加自旋锁
455  size等于Size of arena (in long's). sizeof(unsignedlong)
456  如果mode不等于KCOV_MODE_INITOffset (within vm_file) in PAGE_SIZEunits 不等于0或The first byte after our end addresswithin vm_mm. Our start address within vm_mm. 不等于size
458  res等于负EINVAL
459  转到:exit
461  如果非Coverage buffer shared with user space.
462  Coverage buffer shared with user space. 等于area
463  Flags, see mm.h. 或等于Cannot expand with mremap()
464  自旋锁解锁
465 off小于size循环
470  返回:0
472  exit :
473  自旋锁解锁
474  vfree(area)
475  返回:res