Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kprobes.c Create Date:2022-07-28 11:35:49
Last Modify:2022-05-22 18:14:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:check_kprobe_address_safe

Proto:static int check_kprobe_address_safe(struct kprobe *p, struct module **probed_mod)

Type:int

Parameter:

TypeParameterName
struct kprobe *p
struct module **probed_mod
1553  ret = arch_check_ftrace_location(p)
1554  If ret Then Return ret
1556  jump_label_lock()
1557  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
1560  If Not kernel_text_address((unsignedlong) location of the probe point ) || within_kprobe_blacklist((unsignedlong) location of the probe point ) || jump_label_text_reserved( location of the probe point , location of the probe point ) || find_bug((unsignedlong) location of the probe point ) Then
1564  ret = -EINVAL
1565  Go to out
1569  probed_mod = __module_text_address - get the module whose code contains an address.*@addr: the address.* Must be called with preempt disabled or module mutex held so that* module doesn't get freed during this.
1570  If probed_mod Then
1576  ret = -ENOENT
1577  Go to out
1586  module_put( * probed_mod)
1587  * probed_mod = NULL
1588  ret = -ENOENT
1591  out :
1592  preempt_enable()
1593  jump_label_unlock()
1595  Return ret
Caller
NameDescribe
register_kprobe