Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyctl.c Create Date:2022-07-28 18:19:12
Last Modify:2020-03-18 07:59:52 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:key_get_type_from_user

Proto:static int key_get_type_from_user(char *type, const char __user *_type, unsigned len)

Type:int

Parameter:

TypeParameterName
char *type
const char __user *_type
unsignedlen
49  ret = Copy a NUL terminated string from userspace
50  If ret < 0 Then Return ret
52  If ret == 0 || ret >= len Then Return -EINVAL
54  If type[0] == '.' Then Return -EPERM
56  type[len - 1] = '\0'
57  Return 0
Caller
NameDescribe
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_keyring_searchSearch the specified keyring and any keyrings it links to for a matching* key
keyctl_restrict_keyringApply a restriction to a given keyring.* The caller must have Setattr permission to change keyring restrictions.* The requested type name may be a NULL pointer to reject all attempts* to link to the keyring. In this case, _restriction must also be NULL.