Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:userfaultfd_ioctl

Proto:static long userfaultfd_ioctl(struct file *file, unsigned cmd, unsigned long arg)

Type:long

Parameter:

TypeParameterName
struct file *file
unsignedcmd
unsigned longarg
1866  ret = -EINVAL
1867  ctx = needed for tty driver, and maybe others
1869  If cmd != UFFDIO_API && state machine == UFFD_STATE_WAIT_API Then Return -EINVAL
1873  Case cmd == UFFDIO_API
1874  ret = serland asks for a certain API version and we return which bits* and ioctl commands are implemented in this kernel for such API* version or -EINVAL if unknown.
1875  Break
1876  Case cmd == UFFDIO_REGISTER
1877  ret = userfaultfd_register(ctx, arg)
1878  Break
1879  Case cmd == UFFDIO_UNREGISTER
1880  ret = userfaultfd_unregister(ctx, arg)
1881  Break
1882  Case cmd == UFFDIO_WAKE
1883  ret = serfaultfd_wake may be used in combination with the* UFFDIO_*_MODE_DONTWAKE to wakeup userfaults in batches.
1884  Break
1885  Case cmd == UFFDIO_COPY
1886  ret = userfaultfd_copy(ctx, arg)
1887  Break
1888  Case cmd == UFFDIO_ZEROPAGE
1889  ret = userfaultfd_zeropage(ctx, arg)
1890  Break
1892  Return ret