Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Checks if a given pointer and length is contained by the current* stack frame (if possible)

Proto:static noinline int check_stack_object(const void *obj, unsigned long len)

Type:int

Parameter:

TypeParameterName
const void *obj
unsigned longlen
36  stack = task_stack_page(current process)
37  stackend = stack + THREAD_SIZE
41  If obj + len <= stack || stackend <= obj Then Return NOT_STACK
49  If obj < stack || stackend < obj + len Then Return BAD_STACK
53  ret = Walks up the stack frames to make sure that the specified object is* entirely contained by a single stack frame
54  If ret Then Return ret
57  Return GOOD_STACK
Caller
NameDescribe
__check_object_sizeValidates 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