函数逻辑报告

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

函数名称:datablob_parse - parse the keyctl data and fill in the* payload and options structures* On success returns 0, otherwise -EINVAL.

函数原型:static int datablob_parse(char *datablob, struct trusted_key_payload *p, struct trusted_key_options *o)

返回类型:int

参数:

类型参数名称
char *datablob
struct trusted_key_payload *p
struct trusted_key_options *o
855  ret等于负EINVAL
860  c等于分割字符串
861  如果非c则返回:负EINVAL
863  key_cmd等于match_token(c, key_tokens, args)
865  :key_cmd恒等于Opt_new
867  c等于分割字符串
868  如果非c则返回:负EINVAL
870  ret等于kstrtol - convert a string to a long*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign or a minus sign.
871  如果ret小于0或keylen小于MIN_KEY_SIZEkeylen大于MAX_KEY_SIZE则返回:负EINVAL
873  key_len等于keylen
874  ret等于an have zero or more token= options
875  如果ret小于0则返回:ret
877  ret等于Opt_new
878  退出
879  :key_cmd恒等于Opt_load
881  c等于分割字符串
882  如果非c则返回:负EINVAL
884  blob_len等于strlen - Find the length of a string*@s: The string to be sized除2
885  如果blob_len大于MAX_BLOB_SIZE则返回:负EINVAL
887  ret等于 二进制表示ASCII码的十六进制字符串
888  如果ret小于0则返回:负EINVAL
890  ret等于an have zero or more token= options
891  如果ret小于0则返回:ret
893  ret等于Opt_load
894  退出
895  :key_cmd恒等于Opt_update
897  ret等于an have zero or more token= options
898  如果ret小于0则返回:ret
900  ret等于Opt_update
901  退出
902  :key_cmd恒等于Opt_err
903  返回:负EINVAL
904  退出
906  返回:ret
调用者
名称描述
trusted_instantiaterusted_instantiate - create a new trusted key* Unseal an existing trusted blob or, for a new key, get a* random key, then seal and create a trusted key-type key,* adding it to the specified keyring.* On success, return 0. Otherwise return errno.
trusted_updaterusted_update - reseal an existing key with new PCR values