函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rusted_read - copy the sealed blob data to userspace in hex.* On success, return to userspace the trusted key datablob size.

函数原型:static long trusted_read(const struct key *key, char __user *buffer, size_t buflen)

返回类型:long

参数:

类型参数名称
const struct key *key
char __user *buffer
size_tbuflen
1141  p等于dereference_key_locked(key)
1142  如果非p则返回:负EINVAL
1145  如果bufferbuflen大于等于2乘blob_len
1146  ascii_buf等于分配数组内存
1147  如果非ascii_buf则返回:负ENOMEM
1150  bufp等于ascii_buf
1151 i小于blob_len循环bufp等于hex_byte_pack(bufp, blob[i])
1153  如果copy_to_user(buffer, ascii_buf, 2 * blob_len)不等于0则
1155  返回:负EFAULT
1157  kzfree - like kfree but zero memory*@p: object to free memory of* The memory of the object @p points to is zeroed before freed.* If @p is %NULL, kzfree() does nothing.* Note: this function zeroes the whole allocated buffer which can be a good
1159  返回:2乘blob_len