Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vm_inode_setattr - prevent updating an invalid EVM extended attribute*@dentry: pointer to the affected dentry* Permit update of file attributes when files have a valid EVM signature,* except in the case of them having an immutable portable signature.

Proto:int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
struct iattr *attr
475  ia_valid = ia_valid
481  If evm_initialized & EVM_ALLOW_METADATA_WRITES Then Return 0
484  If Not (ia_valid & ( Attribute flags. These should be or-ed together to figure out what* has been changed! | ATTR_UID | ATTR_GID)) Then Return 0
486  evm_status = vm_verify_current_integrity - verify the dentry's metadata integrity*@dentry: pointer to the affected dentry* Verify and return the dentry's metadata integrity. The exceptions are* before EVM is initialized or in 'fix' mode.
487  If evm_status == INTEGRITY_PASS || evm_status == INTEGRITY_NOXATTRS Then Return 0
490  integrity_audit_msg(Metadata integrity verification , 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, name, "appraise_metadata", integrity_status_msg[evm_status], - EPERM, 0)
493  Return -EPERM