Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:cp_new_stat

Proto:static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf)

Type:int

Parameter:

TypeParameterName
struct kstat *stat
struct stat __user *statbuf
304  If Not valid_dev(dev) || Not valid_dev(rdev) Then Return -EOVERFLOW
307  If size > MAX_NON_LFS Then Return -EOVERFLOW
311  We don't need to memset the whole thing just to initialize the padding (tmp)
312  st_dev = encode_dev(dev)
313  st_ino = ino
314  If size of st_ino < size of ino && st_ino != ino Then Return -EOVERFLOW
316  st_mode = mode
317  st_nlink = nlink
318  If st_nlink != nlink Then Return -EOVERFLOW
320  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.)
321  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.)
322  st_rdev = encode_dev(rdev)
323  st_size = size
324  st_atime = seconds
325  st_mtime = seconds
326  st_ctime = seconds
328  st_atime_nsec = nanoseconds
329  st_mtime_nsec = nanoseconds
330  st_ctime_nsec = nanoseconds
332  Number 512-byte blocks allocated. = blocks
333  st_blksize = Preferred I/O size
334  Return If copy_to_user(statbuf, & tmp, size of tmp ) Then -EFAULT Else 0
Caller
NameDescribe
SYSCALL_DEFINE2
SYSCALL_DEFINE2
SYSCALL_DEFINE2