Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\process_keys.c Create Date:2022-07-28 18:22:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:key_ref_t search_process_keyrings_rcu(struct keyring_search_context *ctx)

Type:key_ref_t

Parameter:

TypeParameterName
struct keyring_search_context *ctx
542  ret = ERR_PTR( - EACCES)
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  If Not IS_ERR(key_ref) Then Go to found
547  err = key_ref
553  If 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 Then
557  cred = cred
560  rka = data[0]
563  cred = cred
565  cred = cred
567  If Not IS_ERR(key_ref) Then Go to found
569  ret = key_ref
574  If err == ERR_PTR( - ENOKEY) || ret == ERR_PTR( - ENOKEY) Then key_ref = ERR_PTR( - ENOKEY)
576  Else if err == ERR_PTR( - EACCES) Then key_ref = ret
578  Else key_ref = err
581  found :
582  Return key_ref
Caller
NameDescribe
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.