函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:strndup_user - duplicate an existing string from user space*@s: The string to duplicate*@n: Maximum number of bytes to copy, including the trailing NUL.* Return: newly allocated copy of @s or an ERR_PTR() in case of error

函数原型:char *strndup_user(const char __user *s, long n)

返回类型:char

参数:

类型参数名称
const char __user *s
longn
223  length等于用户字符串长度
225  如果非length则返回:错误号
228  如果length大于n则返回:错误号
231  p等于memdup_user - duplicate memory region from user space*@src: source address in user space*@len: number of bytes to copy* Return: an ERR_PTR() on failure. Result is physically* contiguous, to be freed by kfree().
233  如果是错误则返回:p
236  p[length - 1]等于'\0'
238  返回:p
调用者
名称描述
perf_event_set_filter
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_join_session_keyringJoin a (named) session keyring.* Create and join an anonymous session keyring or join a named session* keyring, creating it if necessary. A named session keyring must have Search* permission for it to be joined. Session keyrings without this permit will
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.
__keyctl_dh_compute
keyctl_pkey_params_getInterpret parameters. Callers must always call the free function* on params, even if an error is returned.
SYSCALL_DEFINE2Open a filesystem by name so that it can be configured for mounting.* We are allowed to specify a container in which the filesystem will be* opened, thereby indicating which namespaces will be used (notably, which
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.
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.
copy_mount_string