Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kprobes: Make arch_check_ftrace_location static

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

Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

authored by

Punit Agrawal and committed by
Steven Rostedt (VMware)
4402deae 71bdc8fe

+2 -4
-2
include/linux/kprobes.h
··· 361 361 } 362 362 #endif 363 363 364 - int arch_check_ftrace_location(struct kprobe *p); 365 - 366 364 /* Get the kprobe at this addr (if any) - called with preemption disabled */ 367 365 struct kprobe *get_kprobe(void *addr); 368 366
+2 -2
kernel/kprobes.c
··· 1524 1524 return ret; 1525 1525 } 1526 1526 1527 - int __weak arch_check_ftrace_location(struct kprobe *p) 1527 + static int check_ftrace_location(struct kprobe *p) 1528 1528 { 1529 1529 unsigned long ftrace_addr; 1530 1530 ··· 1547 1547 { 1548 1548 int ret; 1549 1549 1550 - ret = arch_check_ftrace_location(p); 1550 + ret = check_ftrace_location(p); 1551 1551 if (ret) 1552 1552 return ret; 1553 1553 jump_label_lock();