Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\sys_x86_64.c Create Date:2022-07-28 07:42:12
Last Modify:2022-05-18 16:45:21 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:arch_get_unmapped_area

Proto:unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags)

Type:unsigned long

Parameter:

TypeParameterName
struct file *filp
unsigned longaddr
unsigned longlen
unsigned longpgoff
unsigned longflags
135  mm = mm
140  addr = mpx_unmapped_area_check(addr, len, flags)
141  If IS_ERR_VALUE(addr) Then Return addr
144  If flags & Interpret addr exactly Then Return 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  If len > end Then Return -ENOMEM
152  If addr Then
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  If end - len >= addr && ( Not vma || addr + len <= vm_start_gap(vma) ) Then Return 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  If filp Then
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  Return Search for an unmapped address range
Caller
NameDescribe
arch_get_unmapped_area_topdown