函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Extended attribute LIST operations

函数原型:static ssize_t listxattr(struct dentry *d, char __user *list, size_t size)

返回类型:ssize_t

参数:

类型参数名称
struct dentry *d
char __user *list
size_tsize
608  char * klist = NULL
610  如果size
611  如果size大于size of extended attribute namelist (64k) size等于size of extended attribute namelist (64k)
613  klist等于kvmalloc(size, GFP_KERNEL)
614  如果非klist则返回:负ENOMEM
618  error等于vfs_listxattr(d, klist, size)
619  如果error大于0则
620  如果sizecopy_to_user(list, klist, error)则error等于负EFAULT
622  否则如果error恒等于负ERANGEsize大于等于size of extended attribute namelist (64k)
625  error等于负E2BIG
628  kvfree() - Free memory.*@addr: Pointer to allocated memory.* kvfree frees memory allocated by any of vmalloc(), kmalloc() or kvmalloc().* It is slightly more efficient to use kfree() or vfree() if you are certain* that you know which one to use.
630  返回:error
调用者
名称描述
path_listxattr
SYSCALL_DEFINE3