函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:userfaultfd_zeropage

函数原型:static int userfaultfd_zeropage(struct userfaultfd_ctx *ctx, unsigned long arg)

返回类型:int

参数:

类型参数名称
struct userfaultfd_ctx *ctx
unsigned longarg
1763  __useruser_uffdio_zeropage
1766  user_uffdio_zeropage等于arg
1768  ret等于负EAGAIN
1769  如果READ_ONCE(memory mappings are changing because of non-cooperative event )则转到:out
1772  ret等于负EFAULT
1773  如果copy_from_user( & uffdio_zeropage, user_uffdio_zeropage, uffdio_zeropage的长度 - sizeof(__s64))则转到:out
1778  ret等于validate_range(mm with one ore more vmas attached to this userfaultfd_ctx , & start, len)
1780  如果ret则转到:out
1782  ret等于负EINVAL
1783  如果mode按位与UFFDIO_ZEROPAGE_MODE_DONTWAKE的反则转到:out
1786  如果mmget_not_zero(mm with one ore more vmas attached to this userfaultfd_ctx )则
1787  ret等于mfill_zeropage(mm with one ore more vmas attached to this userfaultfd_ctx , start, len, & memory mappings are changing because of non-cooperative event )
1790  Decrement the use count and release all resources for an mm.
1791  否则
1792  返回:负ESRCH
1794  如果此条件成立可能性小(为编译器优化)(put_user - Write a simple value into user space(ret, & * "zeropage" is written by the ioctl and must be at the end: * the copy_from_user will not read the last 8 bytes.))则返回:负EFAULT
1796  如果ret小于0则转到:out
1799  BUG_ON(!ret)
1800  len等于ret
1801  如果非mode按位与UFFDIO_ZEROPAGE_MODE_DONTWAKE的值则
1802  start等于start
1803  wake_userfault(ctx, & range)
1805  ret等于如果len恒等于len则0否则负EAGAIN
1806  out :
1807  返回:ret
调用者
名称描述
userfaultfd_ioctl