kprobes: Make arch_check_ftrace_location static
arch_check_ftrace_location() was introduced as a weak function in
f7f242ff0044 ("kprobes: introduce weak arch_check_ftrace_location()
helper function") to allow architectures to handle kprobes call site
on their own.
Recently, the only architecture (csky) to implement
arch_check_ftrace_location() was migrated to using the common
version.
As a result, further cleanup the code to drop the weak attribute and
rename the function to remove the architecture specific
implementation.
Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index f4982c8..d1dadb2 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -361,8 +361,6 @@
}
#endif
-int arch_check_ftrace_location(struct kprobe *p);
-
/* Get the kprobe at this addr (if any) - called with preemption disabled */
struct kprobe *get_kprobe(void *addr);
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 8d18f3a..ab84cb3 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1513,7 +1513,7 @@
return ret;
}
-int __weak arch_check_ftrace_location(struct kprobe *p)
+static int check_ftrace_location(struct kprobe *p)
{
unsigned long ftrace_addr;
@@ -1536,7 +1536,7 @@
{
int ret;
- ret = arch_check_ftrace_location(p);
+ ret = check_ftrace_location(p);
if (ret)
return ret;
jump_label_lock();