函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:quest_key_rcu - Request key from RCU-read-locked context*@type: The type of key we want.*@description: The name of the key we want.*@domain_tag: The domain in which the key operates.* Request a key from a context that we may not sleep in (such as RCU-mode

函数原型:struct key *request_key_rcu(struct key_type *type, const char *description, struct key_tag *domain_tag)

返回类型:struct key

参数:

类型参数名称
struct key_type *type
const char *description
struct key_tag *domain_tag
770  struct keyring_search_context ctx = {type = type, Domain of operation = domain_tag, description = description, desc_len = strlen - Find the length of a string*@s: The string to be sized, cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.(), cmp = By default, we keys found by getting an exact match on their descriptions., Raw match data = description, Type of lookup for this search. = Direct lookup by description. , flags = (Override NO_STATE_CHECK | Ignore expired keys (intention to replace) ), }
785  kenter("%s,%s", ame of the type , description)
787  key等于check_cached_key( & ctx)
788  如果key则返回:key
792  key_ref等于Search the process keyrings attached to the supplied cred for the first* matching key in the manner of search_my_process_keyrings(), but also search* the keys attached to the assumed authorisation key using its credentials if* one is available.
793  如果是错误
794  key等于错误指示
795  如果错误恒等于负EAGAINkey等于错误号
797  否则
798  key等于key_ref_to_ptr(key_ref)
799  cache_requested_key(key)
802  kleave(" = %p", key)
803  返回:key