]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace,kcfi: Define ftrace_stub_graph conditionally
authorArnd Bergmann <arnd@arndb.de>
Tue, 31 Jan 2023 09:36:30 +0000 (10:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:43 +0000 (13:33 +0100)
commit4676d57100ff0e944ccd757fd2a849f6e330eed4
tree645256d969dd40767aca9b5314e1e26f076caa51
parent52aab6a0977d957cf05c5498fba61a87378bb30b
ftrace,kcfi: Define ftrace_stub_graph conditionally

[ Upstream commit dcc0e295396a9ce84dd6a4d1dcc8aed51bc68507 ]

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/20230131093643.3850272-1-arnd@kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Fixes: d57125345156 ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()")
See-also: f000be353582 ("arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/ftrace_64.S