函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\keysetup_v1.c Create Date:2022-07-29 10:57:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Search the current task's subscribed keyrings for a "logon" key with* description prefix:descriptor, and if found acquire a read lock on it and* return a pointer to its validated payload in *payload_ret.

函数原型:static struct key *find_and_lock_process_key(const char *prefix, const u8 descriptor[8], unsigned int min_keysize, const struct fscrypt_key **payload_ret)

返回类型:struct key

参数:

类型参数名称
const char *prefix
const u8descriptor
unsigned intmin_keysize
const struct fscrypt_key **payload_ret
102  description等于kasprintf(GFP_NOFS, "%s%*phN", prefix, FSCRYPT_KEY_DESCRIPTOR_SIZE, descriptor)
104  如果非description则返回:错误号
107  key等于quest_key - Request a key and wait for construction*@type: Type of key.*@description: The searchable description of the key.*@callout_info: The data to pass to the instantiation upcall (or NULL).
108  释放内存
109  如果是错误则返回:key
112  lock for reading
113  ukp等于user_key_payload_locked(key)
115  如果非ukp则转到:invalid
118  payload等于actual data
120  如果length of this data 不等于sizeof(structfscrypt_key)或size小于1或size大于FSCRYPT_MAX_KEY_SIZE
122  fscrypt_warn(NULL, "key with description '%s' has invalid payload", description)
125  转到:invalid
128  如果size小于min_keysize
129  fscrypt_warn(NULL, "key with description '%s' is too short (got %u bytes, need %u+ bytes)", description, size, min_keysize)
132  转到:invalid
135  payload_ret等于payload
136  返回:key
138  invalid :
139  lease a read lock
140  key_put(key)
141  返回:错误号
调用者
名称描述
fscrypt_setup_v1_file_key_via_subscribed_keyrings