diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 2ef90d15699f..3a3c0166bd1f 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1559,7 +1559,8 @@ static int check_kprobe_address_safe(struct kprobe *p, preempt_disable(); /* Ensure it is not in reserved area nor out of text */ - if (!kernel_text_address((unsigned long) p->addr) || + if (!(core_kernel_text((unsigned long) p->addr) || + is_module_text_address((unsigned long) p->addr)) || within_kprobe_blacklist((unsigned long) p->addr) || jump_label_text_reserved(p->addr, p->addr) || static_call_text_reserved(p->addr, p->addr) ||