aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kprobes.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-07-11 11:06:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-11 11:06:09 -0700
commit301c8b1d7c2373f85ed5d944a8e9264dad36064c (patch)
tree040ae2bf2a1d473e7019113fc1a8773fa59e0d40 /kernel/kprobes.c
parentMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi (diff)
parentlocking/atomic: sparc: Fix arch_cmpxchg64_local() (diff)
downloadlinux-dev-301c8b1d7c2373f85ed5d944a8e9264dad36064c.tar.xz
linux-dev-301c8b1d7c2373f85ed5d944a8e9264dad36064c.zip
Merge tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Ingo Molnar: - Fix a Sparc crash - Fix a number of objtool warnings - Fix /proc/lockdep output on certain configs - Restore a kprobes fail-safe * tag 'locking-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/atomic: sparc: Fix arch_cmpxchg64_local() kprobe/static_call: Restore missing static_call_text_reserved() static_call: Fix static_call_text_reserved() vs __init jump_label: Fix jump_label_text_reserved() vs __init locking/lockdep: Fix meaningless /proc/lockdep output of lock classes on !CONFIG_PROVE_LOCKING
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r--kernel/kprobes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 471b1d18a92f..790a573bbe00 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -35,6 +35,7 @@
#include <linux/ftrace.h>
#include <linux/cpu.h>
#include <linux/jump_label.h>
+#include <linux/static_call.h>
#include <linux/perf_event.h>
#include <asm/sections.h>
@@ -1561,6 +1562,7 @@ static int check_kprobe_address_safe(struct kprobe *p,
if (!kernel_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) ||
find_bug((unsigned long)p->addr)) {
ret = -EINVAL;
goto out;