aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-04-23 12:09:38 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2019-04-23 12:28:32 -0400
commit503621628b32782a07b2318e4112bd4372aa3401 (patch)
treecd5ca649274de5a59c9520b03c56b6fa868e646e
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff)
ARM: fix function graph tracer and unwinder dependencies
Naresh Kamboju recently reported that the function-graph tracer crashes on ARM. The function-graph tracer assumes that the kernel is built with frame pointers. We explicitly disabled the function-graph tracer when building Thumb2, since the Thumb2 ABI doesn't have frame pointers. We recently changed the way the unwinder method was selected, which seems to have made it more likely that we can end up with the function- graph tracer enabled but without the kernel built with frame pointers. Fix up the function graph tracer dependencies so the option is not available when we have no possibility of having frame pointers, and adjust the dependencies on the unwinder option to hide the non-frame pointer unwinder options if the function-graph tracer is enabled. Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Tested-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/Kconfig.debug6
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 054ead960f98..5bd8d781b9ff 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -73,7 +73,7 @@ config ARM
73 select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU 73 select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
74 select HAVE_EXIT_THREAD 74 select HAVE_EXIT_THREAD
75 select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL 75 select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
76 select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL 76 select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG
77 select HAVE_FUNCTION_TRACER if !XIP_KERNEL 77 select HAVE_FUNCTION_TRACER if !XIP_KERNEL
78 select HAVE_GCC_PLUGINS 78 select HAVE_GCC_PLUGINS
79 select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7) 79 select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 6d6e0330930b..e388af4594a6 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -47,8 +47,8 @@ config DEBUG_WX
47 47
48choice 48choice
49 prompt "Choose kernel unwinder" 49 prompt "Choose kernel unwinder"
50 default UNWINDER_ARM if AEABI && !FUNCTION_GRAPH_TRACER 50 default UNWINDER_ARM if AEABI
51 default UNWINDER_FRAME_POINTER if !AEABI || FUNCTION_GRAPH_TRACER 51 default UNWINDER_FRAME_POINTER if !AEABI
52 help 52 help
53 This determines which method will be used for unwinding kernel stack 53 This determines which method will be used for unwinding kernel stack
54 traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack, 54 traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
@@ -65,7 +65,7 @@ config UNWINDER_FRAME_POINTER
65 65
66config UNWINDER_ARM 66config UNWINDER_ARM
67 bool "ARM EABI stack unwinder" 67 bool "ARM EABI stack unwinder"
68 depends on AEABI 68 depends on AEABI && !FUNCTION_GRAPH_TRACER
69 select ARM_UNWIND 69 select ARM_UNWIND
70 help 70 help
71 This option enables stack unwinding support in the kernel 71 This option enables stack unwinding support in the kernel