Commit 4402deae authored by Punit Agrawal's avatar Punit Agrawal Committed by Steven Rostedt (VMware)

kprobes: Make arch_check_ftrace_location static

arch_check_ftrace_location() was introduced as a weak function in
commit f7f242ff ("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.

Link: https://lkml.kernel.org/r/163163035673.489837.2367816318195254104.stgit@devnote2Signed-off-by: default avatarPunit Agrawal <punitagrawal@gmail.com>
Acked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 71bdc8fe
...@@ -361,8 +361,6 @@ static inline int arch_prepare_kprobe_ftrace(struct kprobe *p) ...@@ -361,8 +361,6 @@ static inline int arch_prepare_kprobe_ftrace(struct kprobe *p)
} }
#endif #endif
int arch_check_ftrace_location(struct kprobe *p);
/* Get the kprobe at this addr (if any) - called with preemption disabled */ /* Get the kprobe at this addr (if any) - called with preemption disabled */
struct kprobe *get_kprobe(void *addr); struct kprobe *get_kprobe(void *addr);
......
...@@ -1524,7 +1524,7 @@ static inline int warn_kprobe_rereg(struct kprobe *p) ...@@ -1524,7 +1524,7 @@ static inline int warn_kprobe_rereg(struct kprobe *p)
return ret; return ret;
} }
int __weak arch_check_ftrace_location(struct kprobe *p) static int check_ftrace_location(struct kprobe *p)
{ {
unsigned long ftrace_addr; unsigned long ftrace_addr;
...@@ -1547,7 +1547,7 @@ static int check_kprobe_address_safe(struct kprobe *p, ...@@ -1547,7 +1547,7 @@ static int check_kprobe_address_safe(struct kprobe *p,
{ {
int ret; int ret;
ret = arch_check_ftrace_location(p); ret = check_ftrace_location(p);
if (ret) if (ret)
return ret; return ret;
jump_label_lock(); jump_label_lock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment