函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\key.h Create Date:2022-07-27 06:42:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:key_ref_to_ptr

函数原型:static inline struct key *key_ref_to_ptr(const key_ref_t key_ref)

返回类型:struct key

参数:

类型参数名称
const key_ref_tkey_ref
140  返回:key_ref按位与1UL的反
调用者
名称描述
digsig_verifydigsig_verify() - digital signature verification with public key*@keyring: keyring to search key in*@sig: digital signature*@siglen: length of the signature*@data: data*@datalen: length of the data* Returns 0 on success, -EINVAL otherwise
__key_updateAttempt to update an existing key.* The key is given to us with an incremented refcount that we need to discard* if we get an error.
key_create_or_updatekey_create_or_update - Update or create and instantiate a key.*@keyring_ref: A pointer to the destination keyring with possession flag.*@type: The type of key.*@description: The searchable description for the key.
key_updatekey_update - Update a key's contents.*@key_ref: The pointer (plus possession flag) to the key.*@payload: The data to be used to update the key.*@plen: The length of @payload.* Attempt to update the contents of a key with the given payload data. The
search_nested_keyringsSearch a tree of keyrings that point to other keyrings up to the maximum* depth.
keyring_search_rcukeyring_search_rcu - Search a keyring tree for a matching key under RCU*@keyring_ref: A pointer to the keyring with possession indicator
keyring_restrictkeyring_restrict - Look up and apply a restriction to a keyring*@keyring_ref: The keyring to be restricted*@type: The key type that will provide the restriction checker.*@restriction: The restriction options to apply to the keyring
find_key_to_updateSearch the given keyring for a key that might be updated.* The caller must guarantee that the keyring is a keyring and that the* permission is granted to modify the keyring as no check is made here. The
SYSCALL_DEFINE5Extract the description of a new key from userspace and either add it as a* new key to the specified keyring or update a matching key in that keyring.* If the description is NULL or an empty string, the key type is asked to* generate one from the payload.
SYSCALL_DEFINE4Search the process keyrings and keyring trees linked from those for a* matching key. Keyrings must have appropriate Search permission to be* searched.* If a key is found, it will be attached to the destination keyring if there's
keyctl_get_keyring_IDGet the ID of the specified process keyring.* The requested keyring must have search permission to be found.* If successful, the ID of the requested keyring will be returned.
keyctl_revoke_keyRevoke a key.* The key must be grant the caller Write or Setattr permission for this to* work. The key type should give up its quota claim when revoked. The key* and any links to the key will be automatically garbage collected after a
keyctl_invalidate_keyInvalidate a key.* The key must be grant the caller Invalidate permission for this to work.* The key and any links to the key will be automatically garbage collected* immediately.* Keys with KEY_FLAG_KEEP set should not be invalidated.
keyctl_keyring_clearClear the specified keyring, creating an empty process keyring if one of the* special keyring IDs is used.* The keyring must grant the caller Write permission and not have* KEY_FLAG_KEEP set for this to work. If successful, 0 will be returned.
keyctl_keyring_linkCreate a link from a keyring to a key if there's no matching key in the* keyring, otherwise replace the link to the matching key with a link to the* new key.* The key must grant the caller Link permission and the the keyring must grant
keyctl_keyring_unlinkUnlink a key from a keyring.* The keyring must grant the caller Write permission for this to work; the key* itself need not grant the caller anything. If the last link to a key is* removed then that key will be scheduled for destruction.
keyctl_keyring_moveMove a link to a key from one keyring to another, displacing any matching* key from the destination keyring.* The key must grant the caller Link permission and both keyrings must grant* the caller Write permission
keyctl_describe_keyReturn a description of a key to userspace
keyctl_keyring_searchSearch the specified keyring and any keyrings it links to for a matching* key
keyctl_read_keyRead a key's payload
keyctl_chown_keyChange the ownership of a key* The key must grant the caller Setattr permission for this to work, though* the key need not be fully instantiated yet. For the UID to be changed, or* for the GID to be changed to a group the caller is not a member of, the
keyctl_setperm_keyChange the permission mask on a key.* The key must grant the caller Setattr permission for this to work, though* the key need not be fully instantiated yet. If the caller does not have
get_instantiation_keyringGet the destination keyring for instantiation and check that the caller has* Write permission on it.
keyctl_set_timeoutSet or clear the timeout on a key.* Either the key must grant the caller Setattr permission or else the caller* must hold an instantiation authorisation token for the key.* The timeout is either 0 to clear the timeout, or a number of seconds from
keyctl_get_securityGet a key's the LSM security label.* The key must grant the caller View permission for this to work.* If there's a buffer, then up to buflen bytes of data will be placed into it.* If successful, the amount of information available will be returned,
keyctl_session_to_parentAttempt to install the calling process's session keyring on the process's* parent process.* The keyring must exist and must grant the caller LINK permission, and the* parent process must be single-threaded and must have the same effective
key_task_permissionkey_task_permission - Check a key can be used*@key_ref: The key to check.*@cred: The credentials to use.*@perm: The permissions to check for.* Check to see whether permission is granted to use a key in the desired way,
look_up_user_keyringsLook up the user and user session keyrings for the current process's UID,* creating them if they don't exist.
get_user_session_keyring_rcuGet the user session keyring if it exists, but don't create it if it* doesn't.
construct_alloc_keyAllocate a new key in under-construction state and attempt to link it in to* the requested keyring.* May return a key that's already under construction instead if there was a* race between two thread calling request_key().
request_key_and_linkquest_key_and_link - Request a key and cache it in a keyring.*@type: The type of key we want.*@description: The searchable description of the key.*@domain_tag: The domain in which the key operates.
request_key_rcuquest_key_rcu - Request key from RCU-read-locked context*@type: The type of key we want.*@description: The name of the key we want.*@domain_tag: The domain in which the key operates.* Request a key from a context that we may not sleep in (such as RCU-mode
key_get_instantiation_authkeySearch the current process's keyrings for the authorisation key for* instantiation of a key.
key_get_persistentGet the persistent keyring for a specific UID and link it to the nominated* keyring.
keyctl_get_persistentGet the persistent keyring for a specific UID and link it to the nominated* keyring.
dh_data_from_key
keyctl_pkey_params_getInterpret parameters. Callers must always call the free function* on params, even if an error is returned.
selinux_key_permission
smack_key_permissionsmack_key_permission - Smack access on a key*@key_ref: gets to the object*@cred: the credentials to use*@perm: requested key permissions* Return 0 if the task has read and write to the object,* an error code otherwise
integrity_add_key
request_asymmetric_keyRequest an asymmetric key.
search_fscrypt_keyringSearch ->s_master_keys or ->mk_users
key_ref_put