Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\evm\evm_crypto.c Create Date:2022-07-28 20:00:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Calculate the hmac and update security.evm xattr* Expects to be called with i_mutex locked.

Proto:int evm_update_evmxattr(struct dentry *dentry, const char *xattr_name, const char *xattr_value, size_t xattr_value_len)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
const char *xattr_name
const char *xattr_value
size_txattr_value_len
305  inode = d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
307  rc = 0
313  rc = evm_is_immutable(dentry, inode)
314  If rc < 0 Then Return rc
316  If rc Then Return -EPERM
319  algo = HASH_ALGO_SHA1
320  rc = evm_calc_hmac(dentry, xattr_name, xattr_value, xattr_value_len, & data)
322  If rc == 0 Then
323  type = EVM_XATTR_HMAC
324  rc = __vfs_setxattr_noperm(dentry, XATTR_NAME_EVM, & data[1], SHA1_DIGEST_SIZE + 1, 0)
327  Else if rc == -ENODATA && i_opflags & IOP_XATTR Then
328  rc = __vfs_removexattr(dentry, XATTR_NAME_EVM)
330  Return rc
Caller
NameDescribe
evm_inode_post_setxattrvm_inode_post_setxattr - update 'security
evm_inode_post_removexattrvm_inode_post_removexattr - update 'security
evm_inode_post_setattrvm_inode_post_setattr - update 'security