函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mmap.c Create Date:2022-07-27 16:18:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Emulation of deprecated remap_file_pages() syscall.

函数原型:SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags)

返回类型:

参数:

2873  mm等于mm
2875  populate等于0
2876  ret等于负EINVAL
2879  pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n", comm, pid)
2882  如果prot则返回:ret
2884  start等于start按位与PAGE_MASK
2885  size等于size按位与PAGE_MASK
2887  如果startsize小于等于start则返回:ret
2891  如果pgoffsize右移PAGE_SHIFT determines the page size 位的值小于pgoff则返回:ret
2894  如果lock for writing则返回:负EINTR
2897  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
2899  如果非vma或非Flags, see mm.h. 按位与VM_SHARED的值则转到:out
2902  如果start小于Our start address within vm_mm. 则转到:out
2905  如果startsize大于The first byte after our end addresswithin vm_mm.
2908 next循环
2916  如果Flags, see mm.h. 不等于Flags, see mm.h. 则转到:out
2923  如果非next则转到:out
2927  prot或等于如果Flags, see mm.h. 按位与currently active flags page can be read 否则0
2928  prot或等于如果Flags, see mm.h. 按位与VM_WRITEpage can be written 否则0
2929  prot或等于如果Flags, see mm.h. 按位与VM_EXECpage can be executed 否则0
2931  flags与等于do not block on IO
2932  flags或等于Share changes 按位或Interpret addr exactly 按位或populate (prefault) pagetables
2933  如果Flags, see mm.h. 按位与VM_LOCKED
2935  flags或等于pages are locked
2952  file等于get_file(File we map to (can be NULL). )
2953  ret等于do_mmap_pgoff(File we map to (can be NULL). , start, size, prot, flags, pgoff, & populate, NULL)
2955  fput(file)
2956  out :
2957  lease a write lock
2958  如果populatemm_populate(ret, populate)
2960  如果非IS_ERR_VALUE(ret)则ret等于0
2962  返回:ret