Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\util.c Create Date:2022-07-28 14:21:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:char *strndup_user(const char __user *s, long n)

Type:char

Parameter:

TypeParameterName
const char __user *s
longn
223  length = Get the size of a string in user space
225  If Not length Then Return ERR_PTR( - EFAULT)
228  If length > n Then Return ERR_PTR( - EINVAL)
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  If IS_ERR(p) Then Return p
236  p[length - 1] = '\0'
238  Return p
Caller
NameDescribe
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