]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 3 Jan 2020 03:02:41 +0000 (22:02 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
BugLink: https://bugs.launchpad.net/bugs/1861934
commit b8299d362d0837ae39e87e9019ebe6b736e0f035 upstream.

On some archs with some configurations, MCOUNT_INSN_SIZE is not defined, and
this makes the stack tracer fail to compile. Just define it to zero in this
case.

Link: https://lore.kernel.org/r/202001020219.zvE3vsty%lkp@intel.com
Cc: stable@vger.kernel.org
Fixes: 4df297129f622 ("tracing: Remove most or all of stack tracer stack size from stack_max_size")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
kernel/trace/trace_stack.c

index 3c7bfc4bf5e9981b687ca8dd4ed1cf890b38ee12..54e49519652357e5946ff4162a4eeff0d6a8eac5 100644 (file)
@@ -196,6 +196,11 @@ check_stack(unsigned long ip, unsigned long *stack)
        local_irq_restore(flags);
 }
 
+/* Some archs may not define MCOUNT_INSN_SIZE */
+#ifndef MCOUNT_INSN_SIZE
+# define MCOUNT_INSN_SIZE 0
+#endif
+
 static void
 stack_trace_call(unsigned long ip, unsigned long parent_ip,
                 struct ftrace_ops *op, struct pt_regs *pt_regs)