函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vm_set_key() - set EVM HMAC key from the kernel*@key: pointer to a buffer with the key data*@size: length of the key data* This function allows setting the EVM HMAC key from the kernel* without using the "encrypted" key subsystem keys

函数原型:int evm_set_key(void *key, size_t keylen)

返回类型:int

参数:

类型参数名称
void *key
size_tkeylen
56  rc等于负EBUSY
57  如果st_and_set_bit - Set a bit and return its old value*@nr: Bit to set*@addr: Address to count from* This is an atomic fully-ordered operation (implied full memory barrier).则转到:busy
59  rc等于负EINVAL
60  如果keylen大于MAX_KEY_SIZE则转到:inval
62  memcpy(evmkey, key, keylen)
63  evm_initialized或等于EVM_INIT_HMAC
64  打印信息("key initialized\n")
65  返回:0
66  inval :
67  lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
68  busy :
69  打印错误信息("key initialization failed\n")
70  返回:rc
调用者
名称描述
evm_init_keyGet the key from the TPM for the SHA1-HMAC