Skip to content

Commit aa69f81

Browse files
arndbrostedt
authored andcommitted
ftrace,kcfi: Define ftrace_stub_graph conditionally
When CONFIG_FUNCTION_GRAPH_TRACER is disabled, __kcfi_typeid_ftrace_stub_graph is missing, causing a link failure: ld.lld: error: undefined symbol: __kcfi_typeid_ftrace_stub_graph referenced by arch/x86/kernel/ftrace_64.o:(__cfi_ftrace_stub_graph) in archive vmlinux.a Mark the reference to it as conditional on the same symbol, as is done on arm64. Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Cc: Peter Zijlstra <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Josh Poimboeuf <[email protected]> Fixes: 883bbbf ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()") See-also: 2598ac6 ("arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent ee92fa4 commit aa69f81

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/x86/kernel/ftrace_64.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ SYM_TYPED_FUNC_START(ftrace_stub)
136136
RET
137137
SYM_FUNC_END(ftrace_stub)
138138

139+
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
139140
SYM_TYPED_FUNC_START(ftrace_stub_graph)
140141
CALL_DEPTH_ACCOUNT
141142
RET
142143
SYM_FUNC_END(ftrace_stub_graph)
144+
#endif
143145

144146
#ifdef CONFIG_DYNAMIC_FTRACE
145147

0 commit comments

Comments
 (0)