函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Verify the pagetables are still not ok after having reigstered into* the fault_pending_wqh to avoid userland having to UFFDIO_WAKE any* userfault that has already been resolved, if userfaultfd_read and* UFFDIO_COPY|ZEROPAGE are being run simultaneously on

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

返回类型:bool

参数:

类型参数名称
struct userfaultfd_ctx *ctx
unsigned longaddress
unsigned longflags
unsigned longreason
281  mm等于mm with one ore more vmas attached to this userfaultfd_ctx
287  bool ret = true
289  VM_BUG_ON(!In all implementations count != 0 means locked )
291  pgd等于a shortcut to get a pgd_t in a given mm(mm, address)
292  如果非pgd_present( * pgd)则转到:out
294  p4d等于p4d_offset(pgd, address)
295  如果非p4d_present( * p4d)则转到:out
297  pud等于pud_offset(p4d, address)
298  如果非pud_present( * pud)则转到:out
300  pmd等于pmd_offset(pud, address)
309  _pmd等于READ_ONCE( * pmd)
310  如果pmd_none(_pmd)则转到:out
313  ret = false
314  如果非pmd_present(_pmd)则转到:out
317  如果pmd_trans_huge(_pmd)则转到:out
324  pte等于pte_offset_map(pmd, address)
329  如果pte_none( * pte)则ret = true
331  pte_unmap(pte)
333  out :
334  返回: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