diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-06-28 13:24:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:02:27 +0200 |
commit | 1dc6cd71e05d4fc7b3e77741768798fb22798909 (patch) | |
tree | 5d9f45999762ba68c9a3710acc907989f614d91a | |
parent | 80f755926a7e3bb00ff69ee12232b33a473dfc27 (diff) | |
download | linux-stable-1dc6cd71e05d4fc7b3e77741768798fb22798909.tar.gz linux-stable-1dc6cd71e05d4fc7b3e77741768798fb22798909.tar.bz2 linux-stable-1dc6cd71e05d4fc7b3e77741768798fb22798909.zip |
kprobe/static_call: Restore missing static_call_text_reserved()
[ Upstream commit fa68bd09fc62240a383c0c601d3349c47db10c34 ]
Restore two hunks from commit:
6333e8f73b83 ("static_call: Avoid kprobes on inline static_call()s")
that went walkabout in a Git merge commit.
Fixes: 76d4acf22b48 ("Merge tag 'perf-kprobes-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20210628113045.167127609@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | kernel/kprobes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 745f08fdd7a6..c6b4c66b8fa2 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> @@ -1569,6 +1570,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; |