Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Is this address range in the kernel text area?

Proto:static inline void check_kernel_text_object(const unsigned long ptr, unsigned long n, bool to_user)

Type:void

Parameter:

TypeParameterName
const unsigned longptr
unsigned longn
boolto_user
120  textlow = Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains
121  texthigh = Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains
124  If Returns true if any portion of [ptr,ptr+n) over laps with [low,high). Then usercopy_abort("kernel text", NULL, to_user, ptr - textlow, n)
135  textlow_linear = lm_alias(textlow)
137  If textlow_linear == textlow Then Return
141  texthigh_linear = lm_alias(texthigh)
142  If Returns true if any portion of [ptr,ptr+n) over laps with [low,high). Then usercopy_abort("linear kernel text", NULL, to_user, ptr - textlow_linear, n)
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