Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Allocate a keyring and link into the destination keyring.

Proto: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)

Type:struct key

Parameter:

TypeParameterName
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  If Not IS_ERR(keyring) Then
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  If ret < 0 Then
536  keyring = ERR_PTR(ret)
540  Return keyring
Caller
NameDescribe
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