函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__install_special_mapping

函数原型:static struct vm_area_struct *__install_special_mapping(struct mm_struct *mm, unsigned long addr, unsigned long len, unsigned long vm_flags, void *priv, const struct vm_operations_struct *ops)

返回类型:struct vm_area_struct

参数:

类型参数名称
struct mm_struct *mm
unsigned longaddr
unsigned longlen
unsigned longvm_flags
void *priv
const struct vm_operations_struct *ops
3381  vma等于vm_area_alloc(mm)
3382  如果此条件成立可能性小(为编译器优化)(vma == NULL)则返回:错误号
3385  Our start address within vm_mm. 等于addr
3386  The first byte after our end addresswithin vm_mm. 等于addrlen
3388  Flags, see mm.h. 等于vm_flags按位或def_flags按位或Cannot expand with mremap() 按位或VM_SOFTDIRTY
3389  Access permissions of this VMA. 等于vm_get_page_prot(Flags, see mm.h. )
3391  Function pointers to deal with this struct. 等于ops
3392  was vm_pte (shared mem) 等于priv
3394  ret等于Insert vm structure into process list sorted by address* and into the inode's i_mmap tree. If vm_file is non-NULL* then i_mmap_rwsem is taken here.
3395  如果ret则转到:out
3398  vm_stat_account(mm, Flags, see mm.h. , len >> PAGE_SHIFT determines the page size )
3400  perf_event_mmap(vma)
3402  返回:vma
3404  out :
3405  vm_area_free(vma)
3406  返回:错误号
调用者
名称描述
_install_special_mappingCalled with mm->mmap_sem held for writing.* Insert a new vma covering the given region, with the given flags.* Its pages are supplied by the given array of struct page *.* The array can be shorter than len >> PAGE_SHIFT if it's null-terminated.
install_special_mapping