函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:SYSCALL_DEFINE1

函数原型:SYSCALL_DEFINE1(userfaultfd, int, flags)

返回类型:

参数:

1951  如果非sysctl_unprivileged_userfaultfd且非操作权限检查则返回:负EPERM
1954  BUG_ON(!mm)
1957  BUILD_BUG_ON - break compile if a condition is true(CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining* new flags, since they might collide with O_* ones. We want* to re-use O_* flags that couldn't possibly have a meaning* from userfaultfd, in order to leave a free define-space for != O_CLOEXEC)
1958  BUILD_BUG_ON - break compile if a condition is true(UFFD_NONBLOCK != O_NONBLOCK)
1960  如果flags按位与UFFD_SHARED_FCNTL_FLAGS的反则返回:负EINVAL
1963  ctx等于分配高速缓存区
1964  如果非ctx则返回:负ENOMEM
1967  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
1968  userfaultfd syscall flags 等于flags
1969  atures requested from the userspace 等于0
1970  state machine 等于UFFD_STATE_WAIT_API
1971  leased = false
1972  memory mappings are changing because of non-cooperative event = false
1973  mm with one ore more vmas attached to this userfaultfd_ctx 等于mm
1975  mmgrab() - Pin a &struct mm_struct
1977  fd等于anon_inode_getfd - creates a new file instance by hooking it up to an* anonymous inode, and a dentry that describe the "class"* of the file*@name: [in] name of the "class" of the new file*@fops: [in] file operations for the new file*@priv: [in] private
1979  如果fd小于0则
1980  mmdrop(mm with one ore more vmas attached to this userfaultfd_ctx )
1981  kmem_cache_free(userfaultfd_ctx_cachep, ctx)
1983  返回:fd