Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cp_compat_stat

Proto:static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)

Type:int

Parameter:

TypeParameterName
struct kstat *stat
struct compat_stat __user *ubuf
596  If Not acceptable for old filesystems || Not acceptable for old filesystems Then Return -EOVERFLOW
599  memset( & tmp, 0, size of tmp )
600  st_dev = old_encode_dev(dev)
601  st_ino = ino
602  If size of st_ino < size of ino && st_ino != ino Then Return -EOVERFLOW
604  st_mode = mode
605  st_nlink = nlink
606  If st_nlink != nlink Then Return -EOVERFLOW
608  uid/gid input should be always 32bit uid_t (st_uid, m_kuid_munged - Create a uid from a kuid user-namespace pair.*@targ: The user namespace we want a uid in.*@kuid: The kernel internal uid to start with.* Map @kuid into the user-namespace specified by @targ and* return the resulting uid.)
609  SET_GID(st_gid, m_kgid_munged - Create a gid from a kgid user-namespace pair.*@targ: The user namespace we want a gid in.*@kgid: The kernel internal gid to start with.* Map @kgid into the user-namespace specified by @targ and* return the resulting gid.)
610  st_rdev = old_encode_dev(rdev)
611  If size > MAX_NON_LFS Then Return -EOVERFLOW
613  st_size = size
614  st_atime = seconds
615  st_atime_nsec = nanoseconds
616  st_mtime = seconds
617  st_mtime_nsec = nanoseconds
618  st_ctime = seconds
619  st_ctime_nsec = nanoseconds
620  st_blocks = blocks
621  st_blksize = Preferred I/O size
622  Return If copy_to_user(ubuf, & tmp, size of tmp ) Then -EFAULT Else 0
Caller
NameDescribe
COMPAT_SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2