函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Validates that the given object is:* - not bogus address* - fully contained by stack (or stack frame, when available)* - fully within SLAB object (or object whitelist area, when available)* - not in kernel text

函数原型:void __check_object_size(const void *ptr, unsigned long n, bool to_user)

返回类型:void

参数:

类型参数名称
const void *ptr
unsigned longn
boolto_user
258  如果static_branch_unlikely( & bypass_usercopy_checks)则返回
262  如果非n则返回
266  check_bogus_address((constunsignedlong)ptr, n, to_user)
270  :Checks if a given pointer and length is contained by the current* stack frame (if possible)恒等于NOT_STACK
272  退出
273  :Checks if a given pointer and length is contained by the current* stack frame (if possible)恒等于GOOD_FRAME
274  :Checks if a given pointer and length is contained by the current* stack frame (if possible)恒等于GOOD_STACK
280  返回
281  默认
282  usercopy_abort("process stack", NULL, to_user, 0, n)
286  check_heap_object(ptr, n, to_user)
289  Is this address range in the kernel text area?