Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:COMPAT_SYSCALL_DEFINE3

Proto:COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd, struct compat_linux_dirent __user *, dirent, unsigned int, count)

Type:

Parameter:Nothing

529  __user * lastdirent
530  struct compat_getdents_callback buf = {actor = compat_filldir, current_dir = dirent, count = () counts the number of strings in array ARGV.}
537  If Not access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.(dirent, () counts the number of strings in array ARGV.) Then Return -EFAULT
540  f = fdget_pos(fd)
541  If Not file Then Return -EBADF
544  error = iterate_dir(file, & ctx)
545  If error >= 0 Then error = error
547  lastdirent = previous
548  If lastdirent Then
549  If Write a simple value into user space(pos, & d_off) Then error = -EFAULT
551  Else error = () counts the number of strings in array ARGV. - count
554  fdput_pos(f)
555  Return error