Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmap.c Create Date:2022-07-28 14:48:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Some shared mappings will want the pages marked read-only* to track write events. If so, we'll downgrade vm_page_prot* to the private version (using protection_map[] without the* VM_SHARED bit).

Proto:int vma_wants_writenotify(struct vm_area_struct *vma, pgprot_t vm_page_prot)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
pgprot_tvm_page_prot
1643  vm_flags = Flags, see mm.h.
1644  vm_ops = Function pointers to deal with this struct.
1647  If (vm_flags & (VM_WRITE | VM_SHARED)) != (VM_WRITE | VM_SHARED) Then Return 0
1651  If vm_ops && (page_mkwrite || pfn_mkwrite) Then Return 1
1656  If pgprot_val(vm_page_prot) != pgprot_val(vm_pgprot_modify(vm_page_prot, vm_flags)) Then Return 0
1661  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_MEM_SOFT_DIRTY) && Not (vm_flags & VM_SOFTDIRTY) Then Return 1
1665  If vm_flags & Page-ranges managed without "struct page", just pure PFN Then Return 0
1669  Return File we map to (can be NULL). && f_mapping && mapping_cap_account_dirty(f_mapping)
Caller
NameDescribe
vma_set_page_protUpdate vma->vm_page_prot to reflect vma->vm_flags.
mprotect_fixup