Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\uaccess.h Create Date:2022-07-28 05:59:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:py_struct_from_user: copy a struct from userspace*@dst: Destination address, in kernel space

Proto:static __always_inline __must_check int copy_struct_from_user(void *dst, size_t ksize, const void __user *src, size_t usize)

Type:int

Parameter:

TypeParameterName
void *dst
size_tksize
const void __user *src
size_tusize
287  size = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(ksize, usize)
288  rest = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(ksize, usize) - size
291  If usize < ksize Then
292  memset(dst + size, 0, rest)
293  Else if usize > ksize Then
294  ret = heck_zeroed_user: check if a userspace buffer only contains zero bytes*@from: Source address, in userspace
295  If ret <= 0 Then Return If ret Else -E2BIG
299  If copy_from_user(dst, src, size) Then Return -EFAULT
301  Return 0
Caller
NameDescribe
test_copy_struct_from_user
copy_clone_args_from_user
sched_copy_attrMimics kernel/events/core.c perf_copy_attr().
perf_copy_attr