函数逻辑报告

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:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pm2_unseal_cmd() - execute a TPM2_Unload command*@chip: TPM chip to use*@payload: the key data in clear and encrypted form*@options: authentication values and other options*@blob_handle: blob handle* Return: 0 on success* -EPERM on tpm error status* < 0

函数原型:static int tpm2_unseal_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 intblob_handle
250  rc等于tpm_buf_init( & buf, TPM2_ST_SESSIONS, TPM2_CC_UNSEAL)
251  如果rc则返回:rc
254  tpm_buf_append_u32( & buf, blob_handle)
255  pm_buf_append_auth() - append TPMS_AUTH_COMMAND to the buffer
263  rc等于tpm_send(chip, data, tpm_buf_length( & buf))
264  如果rc大于0则rc等于负EPERM
267  如果非rc
268  data_len等于be16_to_cpup((__be16 * ) & data[TPM_HEADER_SIZE + 4])
270  如果data_len小于MIN_KEY_SIZEdata_len大于MAX_KEY_SIZE加1则
271  rc等于负EFAULT
272  转到:out
275  如果tpm_buf_length( & buf)小于TPM_HEADER_SIZE加6加data_len
276  rc等于负EFAULT
277  转到:out
279  data等于data[TPM_HEADER_SIZE + 6]
281  memcpy(key, data, data_len - 1)
282  key_len等于data_len减1
283  migratable等于data[data_len - 1]
286  out :
287  tpm_buf_destroy( & buf)
288  返回: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.