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_init_security - initializes security.evm

Proto:int evm_inode_init_security(struct inode *inode, const struct xattr *lsm_xattr, struct xattr *evm_xattr)

Type:int

Parameter:

TypeParameterName
struct inode *inode
const struct xattr *lsm_xattr
struct xattr *evm_xattr
526  If Not evm_key_loaded() || Not evm_protected_xattr(name) Then Return 0
529  xattr_data = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
530  If Not xattr_data Then Return -ENOMEM
533  type = EVM_XATTR_HMAC
534  rc = evm_init_hmac(inode, lsm_xattr, digest)
535  If rc < 0 Then Go to out
538  value = xattr_data
539  value_len = size of xattr_data
540  name = Security namespace
541  Return 0
542  out :
543  kfree(xattr_data)
544  Return rc