函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Get the user session keyring if it exists, but don't create it if it* doesn't.

函数原型:struct key *get_user_session_keyring_rcu(const struct cred *cred)

返回类型:struct key

参数:

类型参数名称
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  如果非reg_keyring则返回: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  如果是错误则返回:NULL
212  返回:key_ref_to_ptr(session_keyring_r)
调用者
名称描述
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)