函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vfs_getxattr_alloc - allocate memory, if necessary, before calling getxattr* Allocate memory, if not already allocated, or re-allocate correct size,* before retrieving the extended attribute.

函数原型:ssize_t vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value, size_t xattr_size, gfp_t flags)

返回类型:ssize_t

参数:

类型参数名称
struct dentry *dentry
const char *name
char **xattr_value
size_txattr_size
gfp_tflags
271  inode等于 Where the name belongs to - NULL is * negative
272  value等于xattr_value
275  error等于Check permissions for extended attribute access. This is a bit complicated* because different namespaces have very different rules.
276  如果error则返回:error
279  handler等于Find the xattr_handler with the matching prefix.
280  如果是错误则返回:错误
282  如果非get则返回:负EOPNOTSUPP
284  error等于get(handler, dentry, inode, name, NULL, 0)
285  如果error小于0则返回:error
288  如果非valueerror大于xattr_size
289  value等于krealloc - reallocate memory. The contents will remain unchanged.*@p: object to reallocate memory for.*@new_size: how many bytes of memory are required.*@flags: the type of memory to allocate.* The contents of the object pointed to are preserved up to the
290  如果非value则返回:负ENOMEM
292  memset(value, 0, error + 1)
295  error等于get(handler, dentry, inode, name, value, error)
296  xattr_value等于value
297  返回:error
调用者
名称描述
aa_xattrs_matchaa_xattrs_match - check whether a file matches the xattrs defined in profile*@bprm: binprm struct for the process to validate*@profile: profile to match against (NOT NULL)*@state: state to start match in* Returns: number of extended attributes that
ima_read_xattr
evm_verify_hmacvm_verify_hmac - calculate and compare the HMAC with the EVM xattr* Compute the HMAC on the dentry's protected set of extended attributes* and compare it against the stored security
evm_calc_hmac_or_hashCalculate the HMAC value across the set of protected security xattrs.* Instead of retrieving the requested xattr, for performance, calculate* the hmac using the requested xattr value. Don't alloc/free memory for
evm_is_immutable