函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:key_ref_t search_process_keyrings_rcu(struct keyring_search_context *ctx)

返回类型:key_ref_t

参数:

类型参数名称
struct keyring_search_context *ctx
542  ret等于错误号
544  key_ref等于Search the process keyrings attached to the supplied cred for the first* matching key under RCU conditions (the caller must be holding the RCU read* lock)
545  如果非是错误则转到:found
547  err等于key_ref
553  如果 assumed request_key authority 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.()且type不等于key_type_request_key_auth
557  cred等于cred
560  rka等于data[0]
563  cred等于cred
565  cred等于cred
567  如果非是错误则转到:found
569  ret等于key_ref
574  如果err恒等于错误号ret恒等于错误号key_ref等于错误号
576  否则如果err恒等于错误号key_ref等于ret
578  否则key_ref等于err
581  found :
582  返回:key_ref
调用者
名称描述
lookup_user_keyLook up a key ID given us by userspace with a given permissions mask to get* the key it refers to.* Flags can be passed to request that special keyrings be created if referred* to directly, to permit partially constructed keys to be found and to skip
construct_alloc_keyAllocate 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().
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.
request_key_rcuquest_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
key_get_instantiation_authkeySearch the current process's keyrings for the authorisation key for* instantiation of a key.