函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\evm\evm_main.c Create Date:2022-07-27 22:08:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:vm_protect_xattr - protect the EVM extended attribute* Prevent security.evm from being modified or removed without the* necessary permissions or when the existing value is invalid.* The posix xattr acls are 'system' prefixed, which normally would not

函数原型:static int evm_protect_xattr(struct dentry *dentry, const char *xattr_name, const void *xattr_value, size_t xattr_value_len)

返回类型:int

参数:

类型参数名称
struct dentry *dentry
const char *xattr_name
const void *xattr_value
size_txattr_value_len
317  如果字符串比较恒等于0则
318  如果非操作权限检查则返回:负EPERM
320  否则如果非evm_protected_xattr(xattr_name)则
321  如果非posix_xattr_acl(xattr_name)则返回:0
323  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.
324  如果evm_status恒等于INTEGRITY_PASSevm_status恒等于INTEGRITY_NOXATTRS则返回:0
327  转到:out
330  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.
331  如果evm_status恒等于INTEGRITY_NOXATTRS
334  iint等于grity_iint_find - return the iint associated with an inode
335  如果iintflags按位与IMA_NEW_FILE则返回:0
339  如果s_magic恒等于TMPFS_MAGICs_magic恒等于SYSFS_MAGIC则返回:0
343  integrity_audit_msg(Metadata integrity verification , Where the name belongs to - NULL is * negative , name, "update_metadata", integrity_status_msg[evm_status], - EPERM, 0)
349  out :
350  如果evm_status不等于INTEGRITY_PASSintegrity_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)
355  返回:如果evm_status恒等于INTEGRITY_PASS则0否则负EPERM
调用者
名称描述
evm_inode_setxattrvm_inode_setxattr - protect the EVM extended attribute*@dentry: pointer to the affected dentry*@xattr_name: pointer to the affected extended attribute name*@xattr_value: pointer to the new extended attribute value*@xattr_value_len: pointer to the new
evm_inode_removexattrvm_inode_removexattr - protect the EVM extended attribute*@dentry: pointer to the affected dentry*@xattr_name: pointer to the affected extended attribute name* Removing 'security.evm' requires CAP_SYS_ADMIN privileges and that* the current value is valid.