函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:heck_zeroed_user: check if a userspace buffer only contains zero bytes*@from: Source address, in userspace

函数原型:int check_zeroed_user(const void __user *from, size_t size)

返回类型:int

参数:

类型参数名称
const void __user *from
size_tsize
53  align等于from取模sizeof(unsignedlong)
55  如果此条件成立可能性小(为编译器优化)(size == 0)则返回:1
58  from减等于align
59  size加等于align
61  如果非user_access_begin(from, size)则返回:负EFAULT
64  unsafe_get_user(val, (unsignedlong__user * )from, err_fault)
65  如果alignval与等于aligned_byte_mask(align)的反
68 size大于sizeof(unsignedlong)循环
69  如果此条件成立可能性小(为编译器优化)(val)则转到:done
72  from加等于sizeof(unsignedlong)
73  size减等于sizeof(unsignedlong)
75  unsafe_get_user(val, (unsignedlong__user * )from, err_fault)
78  如果size小于sizeof(unsignedlong)则val与等于aligned_byte_mask(size)
81  done :
82  user_access_end()
83  返回:val恒等于0
84  err_fault :
85  user_access_end()
86  返回:负EFAULT
调用者
名称描述
test_check_nonzero_user
copy_struct_from_userpy_struct_from_user: copy a struct from userspace*@dst: Destination address, in kernel space