Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\evm\evm_crypto.c Create Date:2022-07-28 20:00:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:int evm_set_key(void *key, size_t keylen)

Type:int

Parameter:

TypeParameterName
void *key
size_tkeylen
56  rc = -EBUSY
57  If 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). Then Go to busy
59  rc = -EINVAL
60  If keylen > MAX_KEY_SIZE Then Go to inval
62  memcpy(evmkey, key, keylen)
63  evm_initialized |= EVM_INIT_HMAC
64  pr_info("key initialized\n")
65  Return 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  pr_err("key initialization failed\n")
70  Return rc
Caller
NameDescribe
evm_init_keyGet the key from the TPM for the SHA1-HMAC