Skip to contentSkip to conversation

powerpc/kprobes: Fix build error with kprobes disabled.

PATCH Applied Aneesh Kumar K.V 2 participants 2 messages May 22, 2018 – Jun 1, 2018 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/kprobes: Fix build error with kprobes disabled.

arch/powerpc/kernel/stacktrace.c: In function ‘save_stack_trace_tsk_reliable’:
arch/powerpc/kernel/stacktrace.c:176:28: error: ‘kretprobe_trampoline’ undeclared (first use in this function); did you mean ‘is_ftrace_trampoline’?
if (ip == (unsigned long)kretprobe_trampoline)

                            ^~~~~~~~~~~~~~~~~~~~
                            is_ftrace_trampoline

arch/powerpc/kernel/stacktrace.c:176:28: note: each undeclared identifier is reported only once for each function it appears in

---
 arch/powerpc/kernel/stacktrace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/kernel/stacktrace.c +2 -1
index 26a50603177c..8dd6ba0c7d35 100644
@@ -168,13 +168,14 @@ save_stack_trace_tsk_reliable(struct task_struct *tsk,
 		 * arch-dependent code, they are generic.
 		 */
 		ip = ftrace_graph_ret_addr(tsk, &graph_idx, ip, NULL);
-
+#ifdef CONFIG_KPROBES
 		/*
 		 * Mark stacktraces with kretprobed functions on them
 		 * as unreliable.
 		 */
 		if (ip == (unsigned long)kretprobe_trampoline)
 			return 1;
+#endif
 
 		if (!trace->skip)
 			trace->entries[trace->nr_entries++] = ip;
Signature · 1 line
2.17.0
#1 lore raw
Quoted 8 lines · Aneesh Kumar K.V

arch/powerpc/kernel/stacktrace.c: In function ‘save_stack_trace_tsk_reliable’:
arch/powerpc/kernel/stacktrace.c:176:28: error: ‘kretprobe_trampoline’ undeclared (first use in this function); did you mean ‘is_ftrace_trampoline’?
if (ip == (unsigned long)kretprobe_trampoline)

                            ^~~~~~~~~~~~~~~~~~~~
                            is_ftrace_trampoline

arch/powerpc/kernel/stacktrace.c:176:28: note: each undeclared identifier is reported only once for each function it appears in

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/5e3f0d15ae5f95bdde8d092a0884d2

cheers