Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\userfaultfd.c Create Date:2022-07-28 20:20:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:userfaultfd_read

Proto:static ssize_t userfaultfd_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *buf
size_tcount
loff_t *ppos
1203  ctx = needed for tty driver, and maybe others
1204  ret = 0
1206  no_wait = f_flags & O_NONBLOCK
1208  If state machine == UFFD_STATE_WAIT_API Then Return -EINVAL
1211  cycle
1212  If count < size of msg Then Return If ret Then ret Else -EINVAL
1214  _ret = userfaultfd_ctx_read(ctx, no_wait, & msg)
1215  If _ret < 0 Then Return If ret Then ret Else _ret
1217  If copy_to_user((__u64__user * )buf, & msg, size of msg ) Then Return If ret Then ret Else -EFAULT
1219  ret += size of msg
1220  buf += size of msg
1221  count -= size of msg
1226  no_wait = O_NONBLOCK