Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:keyring_search_rcu - Search a keyring tree for a matching key under RCU*@keyring_ref: A pointer to the keyring with possession indicator

Proto:key_ref_t keyring_search_rcu(key_ref_t keyring_ref, struct keyring_search_context *ctx)

Type:key_ref_t

Parameter:

TypeParameterName
key_ref_tkeyring_ref
struct keyring_search_context *ctx
909  iterator = Iteration function to consider each key found.
910  possessed = is_key_possessed(keyring_ref)
911  result = ERR_PTR( - EAGAIN)
913  keyring = key_ref_to_ptr(keyring_ref)
914  key_check(keyring)
916  If type of key != key_type_keyring Then Return ERR_PTR( - ENOTDIR)
919  If Not (flags & Don't check permissions ) Then
920  err = key_task_permission(keyring_ref, cred, Require permission to search (keyring) or find (key) )
921  If err < 0 Then Return ERR_PTR(err)
925  now = ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems.
926  If Search a tree of keyrings that point to other keyrings up to the maximum* depth. Then __key_get(key_ref_to_ptr(result))
928  Return result
Caller
NameDescribe
keyring_searchkeyring_search - Search the supplied keyring tree for a matching key*@keyring: The root of the keyring tree to be searched
get_user_session_keyring_rcuGet the user session keyring if it exists, but don't create it if it* doesn't.
search_cred_keyrings_rcuSearch 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)