linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/kprobes: Fix build error with kprobes disabled.
@ 2018-05-22  9:08 Aneesh Kumar K.V
  2018-06-01 15:54 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Aneesh Kumar K.V @ 2018-05-22  9:08 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: linuxppc-dev, 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

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/kernel/stacktrace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/stacktrace.c b/arch/powerpc/kernel/stacktrace.c
index 26a50603177c..8dd6ba0c7d35 100644
--- a/arch/powerpc/kernel/stacktrace.c
+++ b/arch/powerpc/kernel/stacktrace.c
@@ -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;
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: powerpc/kprobes: Fix build error with kprobes disabled.
  2018-05-22  9:08 [PATCH] powerpc/kprobes: Fix build error with kprobes disabled Aneesh Kumar K.V
@ 2018-06-01 15:54 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2018-06-01 15:54 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus; +Cc: Aneesh Kumar K.V, linuxppc-dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]

On Tue, 2018-05-22 at 09:08:20 UTC, "Aneesh Kumar K.V" wrote:
> 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
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

Applied to powerpc next, thanks.

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

cheers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-01 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-22  9:08 [PATCH] powerpc/kprobes: Fix build error with kprobes disabled Aneesh Kumar K.V
2018-06-01 15:54 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).