函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:This mmap-allocator allocates new areas top-down from below the* stack's low limit (the base):

函数原型:unsigned long arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)

返回类型:unsigned long

参数:

类型参数名称
struct file *filp
unsigned longaddr
unsigned longlen
unsigned longpgoff
unsigned longflags
2122  mm等于mm
2124  mmap_end等于arch_get_mmap_end(addr)
2127  如果len大于mmap_endmmap_min_addr则返回:负ENOMEM
2130  如果flags按位与Interpret addr exactly 则返回:addr
2134  如果addr
2135  addr等于 align the pointer to the (next) page boundary (addr)
2136  vma等于Same as find_vma, but also return a pointer to the previous VMA in *pprev.
2137  如果mmap_endlen大于等于addraddr大于等于mmap_min_addr且非vmaaddrlen小于等于vm_start_gap(vma)的值且非prevaddr大于等于vm_end_gap(prev)的值则返回:addr
2143  flags等于VM_UNMAPPED_AREA_TOPDOWN
2144  length等于len
2145  low_limit等于两数取大(PAGE_SIZE, mmap_min_addr)
2146  high_limit等于arch_get_mmap_base(addr, base of mmap area )
2147  align_mask等于0
2148  addr等于Search for an unmapped address range
2156  如果offset_in_page(addr)则
2157  VM_BUG_ON(addr != - ENOMEM)
2158  flags等于0
2159  low_limit等于TASK_UNMAPPED_BASE
2160  high_limit等于mmap_end
2161  addr等于Search for an unmapped address range
2164  返回:addr