函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Allocate a keyring and link into the destination keyring.

函数原型:struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid, const struct cred *cred, key_perm_t perm, unsigned long flags, struct key_restriction *restrict_link, struct key *dest)

返回类型:struct key

参数:

类型参数名称
const char *description
kuid_tuid
kgid_tgid
const struct cred *cred
key_perm_tperm
unsigned longflags
struct key_restriction *restrict_link
struct key *dest
530  keyring等于key_alloc - Allocate a key of the specified type.*@type: The type of key to allocate.*@desc: The key description to allow the key to be searched out.*@uid: The owner of the new key.*@gid: The group ID for the new key's group permissions.
532  如果非是错误
533  ret等于key_instantiate_and_link - Instantiate a key and link it into the keyring.*@key: The key to instantiate.*@data: The data to use to instantiate the keyring.*@datalen: The length of @data.*@keyring: Keyring to create a link in on success (or NULL).
534  如果ret小于0则
536  keyring等于错误号
540  返回:keyring
调用者
名称描述
get_user_registerGet or create a user register keyring.
look_up_user_keyringsLook up the user and user session keyrings for the current process's UID,* creating them if they don't exist.
install_thread_keyring_to_credInstall a thread keyring to the given credentials struct if it didn't have* one already. This is allowed to overrun the quota.* Return: 0 if a thread keyring is now present; -errno on failure.
install_process_keyring_to_credInstall a process keyring to the given credentials struct if it didn't have* one already. This is allowed to overrun the quota.* Return: 0 if a process keyring is now present; -errno on failure.
install_session_keyring_to_credInstall the given keyring as the session keyring of the given credentials* struct, replacing the existing one if any. If the given keyring is NULL,* then install a new anonymous session keyring.*@cred can not be in use by any task yet.
join_session_keyringJoin the named keyring as the session keyring if possible else attempt to* create a new one of that name and join that
call_sbin_request_keyRequest userspace finish the construction of a key* - execute "/sbin/request-key "
key_create_persistent_registerCreate the persistent keyring register for the current user namespace.* Called with the namespace's sem locked for writing.
key_create_persistentCreate the persistent keyring for the specified user.* Called with the namespace's sem locked for writing.
__integrity_init_keyring
ima_mok_initAllocate the IMA blacklist keyring
allocate_master_key_users_keyring
fsverity_init_signature