Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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().

Proto:void *memdup_user(const void __user *src, size_t len)

Type:void

Parameter:

TypeParameterName
const void __user *src
size_tlen
172  p = kmalloc_track_caller(len, GFP_USER | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.)
173  If Not p Then Return ERR_PTR( - ENOMEM)
176  If copy_from_user(p, src, len) Then
177  kfree - free previously allocated memory*@objp: pointer returned by kmalloc.* If @objp is NULL, no operation is performed.* Don't free memory not originally allocated by kmalloc()* or you will run into trouble.
178  Return ERR_PTR( - EFAULT)
181  Return p
Caller
NameDescribe
kcov_ioctl
__bpf_copy_key
strndup_userstrndup_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
sed_ioctl
keyctl_pkey_verifyVerify a signature
smk_write_revoke_subjsmk_write_revoke_subj - write() for /smack/revoke-subject*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0
ib_is_buffer_cleared