函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Commence key construction.

函数原型:static struct key *construct_key_and_link(struct keyring_search_context *ctx, const char *callout_info, size_t callout_len, void *aux, struct key *dest_keyring, unsigned long flags)

返回类型:struct key

参数:

类型参数名称
struct keyring_search_context *ctx
const char *callout_info
size_tcallout_len
void *aux
struct key *dest_keyring
unsigned longflags
484  kenter("")
486  如果type恒等于key_type_keyring则返回:错误号
489  ret等于Get the appropriate destination keyring for the request.* The keyring selected is returned with an extra reference upon it which the* caller must release.
490  如果ret则转到:error
493  user等于Get the key quota record for a user, allocating a new record if one doesn't* already exist.
494  如果非user
495  ret等于负ENOMEM
496  转到:error_put_dest_keyring
499  ret等于Allocate a new key in under-construction state and attempt to link it in to* the requested keyring.* May return a key that's already under construction instead if there was a* race between two thread calling request_key().
500  Dispose of a user structure
502  如果ret恒等于0则
503  ret等于Call out to userspace for key construction.* Program failure is ignored in favour of key status.
505  如果ret小于0则
506  kdebug("cons failed")
507  转到:construction_failed
509  否则如果ret恒等于负EINPROGRESS
510  ret等于0
511  否则
512  转到:error_put_dest_keyring
515  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
516  kleave(" = key %d", key_serial(key))
517  返回:key
519  construction_failed :
520  key_negate_and_link(key, default timeout on a negative key's existence , NULL, NULL)
521  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
522  error_put_dest_keyring :
523  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
524  error :
525  kleave(" = %d", ret)
526  返回:错误号
调用者
名称描述
request_key_and_linkquest_key_and_link - Request a key and cache it in a keyring.*@type: The type of key we want.*@description: The searchable description of the key.*@domain_tag: The domain in which the key operates.