函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:check_vma_flags

函数原型:static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longgup_flags
678  vm_flags等于Flags, see mm.h.
679  write等于gup_flags按位与check pte is writable
680  foreign等于gup_flags按位与we are working on non-current tsk/mm
682  如果vm_flags按位与Memory mapped I/O or similar 按位或Page-ranges managed without "struct page", just pure PFN 的值则返回:负EFAULT
685  如果gup_flags按位与don't do file mappings 且非vma_is_anonymous(vma)则返回:负EFAULT
688  如果write
689  如果非vm_flags按位与VM_WRITE的值则
690  如果非gup_flags按位与get_user_pages read/write w/o permission 的值则返回:负EFAULT
701  如果非is_cow_mapping(vm_flags)则返回:负EFAULT
704  否则如果非vm_flags按位与currently active flags 的值则
705  如果非gup_flags按位与get_user_pages read/write w/o permission 的值则返回:负EFAULT
711  如果非vm_flags按位与limits for mprotect() etc 的值则返回:负EFAULT
718  如果非arch_vma_access_permitted(vma, write, TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., foreign)则返回:负EFAULT
720  返回:0
调用者
名称描述
__get_user_pages__get_user_pages() - pin user pages in memory*@tsk: task_struct of target task*@mm: mm_struct of target mm*@start: starting user address*@nr_pages: number of pages from start to pin*@gup_flags: flags modifying pin behaviour