函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\nommu.c Create Date:2022-07-27 16:04:16
Last Modify:2020-03-17 21:26:27 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:xpand (or shrink) an existing mapping, potentially moving it at the same* time (controlled by the MREMAP_MAYMOVE flag and available VM space)* under NOMMU conditions, we only permit changing a mapping's size, and only* as long as it stays within the

函数原型:static unsigned long do_mremap(unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, unsigned long new_addr)

返回类型:unsigned long

参数:

类型参数名称
unsigned longaddr
unsigned longold_len
unsigned longnew_len
unsigned longflags
unsigned longnew_addr
1605  old_len等于 align the pointer to the (next) page boundary (old_len)
1606  new_len等于 align the pointer to the (next) page boundary (new_len)
1607  如果old_len恒等于0或new_len恒等于0则返回:(unsigned long) - EINVAL
1610  如果offset_in_page(addr)则返回:负EINVAL
1613  如果flags按位与MREMAP_FIXEDnew_addr不等于addr则返回:(unsigned long) - EINVAL
1616  vma等于look up the first VMA exactly that exactly matches addr* - should be called with mm->mmap_sem at least held readlocked
1617  如果非vma则返回:(unsigned long) - EINVAL
1620  如果The first byte after our end addresswithin vm_mm. 不等于Our start address within vm_mm. old_len则返回:(unsigned long) - EFAULT
1623  如果Flags, see mm.h. 按位与VM_MAYSHARE则返回:(unsigned long) - EPERM
1626  如果new_len大于vm_endvm_start则返回:(unsigned long) - ENOMEM
1630  The first byte after our end addresswithin vm_mm. 等于Our start address within vm_mm. new_len
1631  返回:Our start address within vm_mm.
调用者
名称描述
SYSCALL_DEFINE5