函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vm_write_key - write() for <securityfs>/evm*@file: file pointer, not actually used*@buf: where to get the data from*@count: bytes sent*@ppos: where to start* Used to signal that key is on the kernel key ring

函数原型:static ssize_t evm_write_key(struct file *file, const char __user *buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tcount
loff_t *ppos
73  如果非操作权限检查evm_initialized按位与userland has signaled key load 则返回:负EPERM
76  ret等于kstrtoint_from_user(buf, count, 0, & i)
78  如果ret则返回:ret
82  如果非ii按位与EVM_INIT_MASK的反的值不等于0则返回:负EINVAL
88  如果i按位与EVM_ALLOW_METADATA_WRITESevm_initialized按位与EVM_KEY_MASK的值不等于0且非evm_initialized按位与EVM_ALLOW_METADATA_WRITES的值则返回:负EPERM
93  如果i按位与EVM_INIT_HMAC
94  ret等于Get the key from the TPM for the SHA1-HMAC
95  如果ret不等于0则返回:ret
98  i或等于userland has signaled key load
101  evm_initialized或等于i
106  如果evm_initialized按位与EVM_INIT_HMACevm_initialized与等于EVM_ALLOW_METADATA_WRITES的反
109  返回:count