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:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Get the user session keyring if it exists, but don't create it if it* doesn't.

Proto:struct key *get_user_session_keyring_rcu(const struct cred *cred)

Type:struct key

Parameter:

TypeParameterName
const struct cred *cred
187  reg_keyring = READ_ONCE(user_keyring_register)
191  struct keyring_search_context ctx = {type = & key_type_keyring, description = buf, cred = cred, cmp = By default, we keys found by getting an exact match on their descriptions., Raw match data = buf, Type of lookup for this search. = Direct lookup by description. , flags = Override NO_STATE_CHECK , }
201  If Not reg_keyring Then Return NULL
204  desc_len = snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
208  session_keyring_r = keyring_search_rcu - Search a keyring tree for a matching key under RCU*@keyring_ref: A pointer to the keyring with possession indicator
210  If IS_ERR(session_keyring_r) Then Return NULL
212  Return key_ref_to_ptr(session_keyring_r)
Caller
NameDescribe
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)