函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:key_get_type_from_user

函数原型:static int key_get_type_from_user(char *type, const char __user *_type, unsigned len)

返回类型:int

参数:

类型参数名称
char *type
const char __user *_type
unsignedlen
49  ret等于复制用户字符串
50  如果ret小于0则返回:ret
52  如果ret恒等于0或ret大于等于len则返回:负EINVAL
54  如果type[0]恒等于'.'则返回:负EPERM
56  type[len - 1]等于'\0'
57  返回:0
调用者
名称描述
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.