From: Kees Cook <keescook@chromium.org>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER
Date: Fri, 11 Nov 2022 10:32:55 -0800 [thread overview]
Message-ID: <202211111032.BBEEDFA0@keescook> (raw)
In-Reply-To: <20221109192831.3057131-1-samitolvanen@google.com>
On Wed, Nov 09, 2022 at 07:28:31PM +0000, Sami Tolvanen wrote:
> The 0-day bot reports that arm64 builds with CONFIG_CFI_CLANG +
> CONFIG_FTRACE are broken when CONFIG_FUNCTION_GRAPH_TRACER is not
> enabled:
>
> ld.lld: error: undefined symbol: __kcfi_typeid_ftrace_stub_graph
> >>> referenced by entry-ftrace.S:299 (arch/arm64/kernel/entry-ftrace.S:299)
> >>> arch/arm64/kernel/entry-ftrace.o:(.text+0x48) in archive vmlinux.a
>
> This is caused by ftrace_stub_graph using SYM_TYPE_FUNC_START when
> the address of the function is not taken in any C translation unit.
>
> Fix the build by only defining ftrace_stub_graph when it's actually
> needed, i.e. with CONFIG_FUNCTION_GRAPH_TRACER.
>
> Link: https://lore.kernel.org/lkml/202210251659.tRMs78RH-lkp@intel.com/
> Fixes: 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
next prev parent reply other threads:[~2022-11-11 18:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 19:28 [PATCH] arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER Sami Tolvanen
2022-11-11 13:29 ` Masami Hiramatsu
2022-11-11 16:09 ` Mark Rutland
2022-11-11 18:32 ` Kees Cook [this message]
2022-11-14 13:28 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202211111032.BBEEDFA0@keescook \
--to=keescook@chromium.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox