函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\trusted-keys\trusted_tpm2.c Create Date:2022-07-27 20:06:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pm2_load_cmd() - execute a TPM2_Load command*@chip: TPM chip to use*@payload: the key data in clear and encrypted form*@options: authentication values and other options*@blob_handle: returned blob handle* Return: 0 on success.

函数原型:static int tpm2_load_cmd(struct tpm_chip *chip, struct trusted_key_payload *payload, struct trusted_key_options *options, unsigned int *blob_handle)

返回类型:int

参数:

类型参数名称
struct tpm_chip *chip
struct trusted_key_payload *payload
struct trusted_key_options *options
unsigned int *blob_handle
187  private_len等于be16_to_cpup((__be16 * ) & blob[0])
188  如果private_len大于blob_len减2则返回:负E2BIG
191  public_len等于be16_to_cpup((__be16 * ) & blob[2 + private_len])
192  blob_len等于private_lenpublic_len加4
193  如果blob_len大于blob_len则返回:负E2BIG
196  rc等于tpm_buf_init( & buf, TPM2_ST_SESSIONS, TPM2_CC_LOAD)
197  如果rc则返回:rc
200  tpm_buf_append_u32( & buf, keyhandle)
201  pm_buf_append_auth() - append TPMS_AUTH_COMMAND to the buffer
207  tpm_buf_append( & buf, blob, blob_len)
209  如果flags按位与TPM_BUF_OVERFLOW
210  rc等于负E2BIG
211  转到:out
214  rc等于tpm_send(chip, data, tpm_buf_length( & buf))
215  如果非rcblob_handle等于be32_to_cpup((__be32 * ) & data[TPM_HEADER_SIZE])
219  out :
220  tpm_buf_destroy( & buf)
222  如果rc大于0则rc等于负EPERM
225  返回:rc
调用者
名称描述
tpm2_unseal_trustedpm2_unseal_trusted() - unseal the payload of a trusted key*@chip: TPM chip to use*@payload: the key data in clear and encrypted form*@options: authentication values and other options* Return: Same as with tpm_send.