函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cp_compat_stat

函数原型:static int cp_compat_stat(struct kstat *stat, struct compat_stat __user *ubuf)

返回类型:int

参数:

类型参数名称
struct kstat *stat
struct compat_stat __user *ubuf
596  如果非acceptable for old filesystems 或非acceptable for old filesystems 则返回:负EOVERFLOW
599  memset( & tmp, 0, tmp的长度)
600  st_dev等于old_encode_dev(dev)
601  st_ino等于ino
602  如果st_ino的长度小于ino的长度且st_ino不等于ino则返回:负EOVERFLOW
604  st_mode等于mode
605  st_nlink等于nlink
606  如果st_nlink不等于nlink则返回:负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  如果size大于MAX_NON_LFS则返回:负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  返回:如果copy_to_user(ubuf, & tmp, tmp的长度)则负EFAULT否则0
调用者
名称描述
COMPAT_SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2