Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_appraise.c Create Date:2022-07-28 19:59:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ima_fix_xattr

Proto:static int ima_fix_xattr(struct dentry *dentry, struct integrity_iint_cache *iint)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
struct integrity_iint_cache *iint
65  algo = algo
67  If algo <= HASH_ALGO_SHA1 Then
68  offset = 1
69  type = IMA_XATTR_DIGEST
70  Else
71  offset = 0
72  type = IMA_XATTR_DIGEST_NG
73  algo = algo
75  rc = __vfs_setxattr_noperm(dentry, XATTR_NAME_IMA, & data[offset], ( size of xattr - offset) + length, 0)
79  Return rc
Caller
NameDescribe
ima_appraise_measurementma_appraise_measurement - appraise file measurement* Call evm_verifyxattr() to verify the integrity of 'security.ima'.* Assuming success, compare the xattr hash with the collected measurement.* Return 0 on success, error code otherwise
ima_update_xattrma_update_xattr - update 'security.ima' hash value