函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\userfaultfd.c Create Date:2022-07-29 10:52:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Same functionality as userfaultfd_must_wait below with modifications for* hugepmd ranges.

函数原型:static inline bool userfaultfd_huge_must_wait(struct userfaultfd_ctx *ctx, struct vm_area_struct *vma, unsigned long address, unsigned long flags, unsigned long reason)

返回类型:bool

参数:

类型参数名称
struct userfaultfd_ctx *ctx
struct vm_area_struct *vma
unsigned longaddress
unsigned longflags
unsigned longreason
233  mm等于mm with one ore more vmas attached to this userfaultfd_ctx
235  bool ret = true
237  VM_BUG_ON(!In all implementations count != 0 means locked )
239  ptep等于huge_pte_offset(mm, address, Return the page size being used by the MMU to back a VMA. In the majority* of cases, the page size used by the kernel matches the MMU size. On* architectures where it differs, an architecture-specific 'strong'* version of this symbol is required.)
241  如果非ptep则转到:out
244  ret = false
245  pte等于huge_ptep_get(ptep)
251  如果huge_pte_none(pte)则ret = true
253  如果非huge_pte_write(pte)且reason按位与wrprotect pages tracking ret = true
255  out :
256  返回:ret
调用者
名称描述
handle_userfaultThe locking rules involved in returning VM_FAULT_RETRY depending on* FAULT_FLAG_ALLOW_RETRY, FAULT_FLAG_RETRY_NOWAIT and* FAULT_FLAG_KILLABLE are not straightforward