Function report |
Source Code:mm\mmap.c |
Create Date:2022-07-28 14:49:58 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Emulation of deprecated remap_file_pages() syscall.
Proto:SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags)
Type:
Parameter:Nothing
| 2875 | populate = 0 |
| 2879 | pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n", comm, pid) |
| 2891 | If pgoff + (size >> PAGE_SHIFT determines the page size ) < pgoff Then Return ret |
| 2894 | If lock for writing Then Return -EINTR |
| 2899 | If Not vma || Not (Flags, see mm.h. & VM_SHARED) Then Go to out |
| 2902 | If start < Our start address within vm_mm. Then Go to out |
| 2905 | If start + size > The first byte after our end addresswithin vm_mm. Then |
| 2910 | If Our start address within vm_mm. != The first byte after our end addresswithin vm_mm. Then Go to out |
| 2913 | If File we map to (can be NULL). != File we map to (can be NULL). Then Go to out |
| 2916 | If Flags, see mm.h. != Flags, see mm.h. Then Go to out |
| 2919 | If start + size <= The first byte after our end addresswithin vm_mm. Then Break |
| 2927 | prot |= If Flags, see mm.h. & currently active flags Then page can be read Else 0 |
| 2928 | prot |= If Flags, see mm.h. & VM_WRITE Then page can be written Else 0 |
| 2929 | prot |= If Flags, see mm.h. & VM_EXEC Then page can be executed Else 0 |
| 2931 | flags &= do not block on IO |
| 2933 | If Flags, see mm.h. & VM_LOCKED Then |
| 2935 | flags |= pages are locked |
| 2938 | When Our start address within vm_mm. >= start + size cycle |
| 2944 | vma_adjust_trans_huge(tmp, start, start + size, 0) |
| 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) |
| 2956 | out : |
| 2957 | lease a write lock |
| 2958 | If populate Then mm_populate(ret, populate) |
| 2960 | If Not IS_ERR_VALUE(ret) Then ret = 0 |
| 2962 | Return ret |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |