Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:we've determined that we can make the mapping, now translate what we* now know into VMA flags

Proto:static unsigned long determine_vm_flags(struct file *file, unsigned long prot, unsigned long flags, unsigned long capabilities)

Type:unsigned long

Parameter:

TypeParameterName
struct file *file
unsigned longprot
unsigned longflags
unsigned longcapabilities
953  vm_flags = Combine the mmap "prot" argument into "vm_flags" used internally. | Combine the mmap "flags" argument into "vm_flags" used internally.
956  If Not (capabilities & Can be mapped directly (MAP_SHARED)) Then
958  vm_flags |= limits for mprotect() etc | VM_MAYWRITE | VM_MAYEXEC
959  If file && Not (prot & page can be written ) Then vm_flags |= VM_MAYSHARE
961  Else
965  vm_flags |= VM_MAYSHARE | capabilities & NOMMU_VMFLAGS
966  If flags & Share changes Then vm_flags |= VM_SHARED
974  If flags & Changes are private && ptrace Then vm_flags &= ~VM_MAYSHARE
977  Return vm_flags
Caller
NameDescribe
do_mmaphandle mapping creation for uClinux