Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:ssize_t vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value, size_t xattr_size, gfp_t flags)

Type:ssize_t

Parameter:

TypeParameterName
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  If error Then Return error
279  handler = Find the xattr_handler with the matching prefix.
280  If IS_ERR(handler) Then Return PTR_ERR(handler)
282  If Not get Then Return -EOPNOTSUPP
284  error = get(handler, dentry, inode, name, NULL, 0)
285  If error < 0 Then Return error
288  If Not value || error > xattr_size Then
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  If Not value Then Return -ENOMEM
292  memset(value, 0, error + 1)
295  error = get(handler, dentry, inode, name, value, error)
296  xattr_value = value
297  Return error
Caller
NameDescribe
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