Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\nommu.c Create Date:2022-07-28 14:37:57
Last Modify:2020-03-17 21:26:27 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static unsigned long do_mremap(unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, unsigned long new_addr)

Type:unsigned long

Parameter:

TypeParameterName
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  If old_len == 0 || new_len == 0 Then Return (unsigned long) - EINVAL
1610  If offset_in_page(addr) Then Return -EINVAL
1613  If flags & MREMAP_FIXED && new_addr != addr Then Return (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  If Not vma Then Return (unsigned long) - EINVAL
1620  If The first byte after our end addresswithin vm_mm. != Our start address within vm_mm. + old_len Then Return (unsigned long) - EFAULT
1623  If Flags, see mm.h. & VM_MAYSHARE Then Return (unsigned long) - EPERM
1626  If new_len > vm_end - vm_start Then Return (unsigned long) - ENOMEM
1630  The first byte after our end addresswithin vm_mm. = Our start address within vm_mm. + new_len
1631  Return Our start address within vm_mm.
Caller
NameDescribe
SYSCALL_DEFINE5