函数逻辑报告

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:55
Last Modify:2022-05-18 16:45:21 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static void find_start_end(unsigned long addr, unsigned long flags, unsigned long *begin, unsigned long *end)

返回类型:void

参数:

类型参数名称
unsigned longaddr
unsigned longflags
unsigned long *begin
unsigned long *end
108  如果非in_32bit_syscall()且flags按位与ly give out 32bit addresses
116  begin等于0x40000000
117  end等于0x80000000
118  如果flags按位与Randomize virtual address space
119  begin等于randomize_page( * begin, 0x02000000)
121  返回
124  begin等于get_mmap_base(1)
125  如果in_32bit_syscall()则end等于task_size_32bit()
127  否则end等于task_size_64bit(addr > DEFAULT_MAP_WINDOW)
调用者
名称描述
arch_get_unmapped_area