函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\sys_x86_64.c Create Date:2022-07-27 08:41:57
Last Modify:2022-05-18 16:45:21 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:arch_get_unmapped_area

函数原型:unsigned long arch_get_unmapped_area(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
135  mm等于mm
140  addr等于mpx_unmapped_area_check(addr, len, flags)
141  如果IS_ERR_VALUE(addr)则返回:addr
144  如果flags按位与Interpret addr exactly 则返回:addr
147  SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,unsigned long, prot, unsigned long, flags,unsigned long, fd, unsigned long, off)long error;error = -EINVAL;if (off & ~PAGE_MASK)goto out;error = ksys_mmap_pgoff(addr, len, prot, flags, fd, off
149  如果len大于end则返回:负ENOMEM
152  如果addr
153  addr等于 align the pointer to the (next) page boundary (addr)
154  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
155  如果endlen大于等于addr且非vmaaddrlen小于等于vm_start_gap(vma)的值则返回:addr
160  flags等于0
161  length等于len
162  low_limit等于begin
163  high_limit等于end
164  align_mask等于0
165  align_offset等于pgoff左移PAGE_SHIFT determines the page size
166  如果filp
167  align_mask等于Align a virtual address to avoid aliasing in the I$ on AMD F15h.
168  align_offset加等于To avoid aliasing in the I$ on AMD F15h, the bits defined by the* va_align.bits, [12:upper_bit), are set to a random value instead of* zeroing them. This random value is computed once per boot. This form* of ASLR is known as "per-boot ASLR".
170  返回:Search for an unmapped address range
调用者
名称描述
arch_get_unmapped_area_topdown