函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\stat.c Create Date:2022-07-29 10:32:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:cp_new_stat

函数原型:static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf)

返回类型:int

参数:

类型参数名称
struct kstat *stat
struct stat __user *statbuf
304  如果非valid_dev(dev)或非valid_dev(rdev)则返回:负EOVERFLOW
307  如果size大于MAX_NON_LFS则返回:负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  如果st_ino的长度小于ino的长度且st_ino不等于ino则返回:负EOVERFLOW
316  st_mode等于mode
317  st_nlink等于nlink
318  如果st_nlink不等于nlink则返回:负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  返回:如果copy_to_user(statbuf, & tmp, tmp的长度)则负EFAULT否则0
调用者
名称描述
SYSCALL_DEFINE2
SYSCALL_DEFINE2
SYSCALL_DEFINE2