Function report |
Source Code:security\integrity\evm\evm_secfs.c |
Create Date:2022-07-28 20:00:16 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static ssize_t evm_write_key(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
Type:ssize_t
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file | |
const char __user * | buf | |
size_t | count | |
loff_t * | ppos |
73 | If Not Check operation authority || evm_initialized & userland has signaled key load Then Return -EPERM |
76 | ret = kstrtoint_from_user(buf, count, 0, & i) |
82 | If Not i || (i & ~EVM_INIT_MASK) != 0 Then Return -EINVAL |
88 | If i & EVM_ALLOW_METADATA_WRITES && (evm_initialized & EVM_KEY_MASK) != 0 && Not (evm_initialized & EVM_ALLOW_METADATA_WRITES) Then Return -EPERM |
93 | If i & EVM_INIT_HMAC Then |
101 | evm_initialized |= i |
106 | If evm_initialized & EVM_INIT_HMAC Then evm_initialized &= ~EVM_ALLOW_METADATA_WRITES |
109 | Return count |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |