From: "Arnd Bergmann" <arnd@arndb.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Ard Biesheuvel" <ardb@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Mark Rutland" <mark.rutland@arm.com>
Subject: Re: FUNCTION_GRAPH_TRACER + UNWINDER_FRAME_POINTER broken on arm
Date: Mon, 27 May 2024 11:18:32 +0200 [thread overview]
Message-ID: <36cd10de-c51c-40ff-90e8-71495406019d@app.fastmail.com> (raw)
In-Reply-To: <alp44tukzo6mvcwl4ke4ehhmojrqnv6xfcdeuliybxfjfvgd3e@gpjvwj33cc76>
On Sat, May 25, 2024, at 09:59, Uwe Kleine-König wrote:
>
> With FUNCTION_GRAPH_TRACER=y and CONFIG_UNWINDER_FRAME_POINTER=y I
> experience the following issue:
>
> # echo function_graph > /sys/kernel/tracing/current_tracer
> [ 303.812295] Kernel panic - not syncing: �e
> [ 303.816738] ---[ end Kernel panic - not syncing: �e ]---
>
> This reproduces reliably on v6.9 (on an i.MX25 based machine).
>
> Bisection points on v5.18-rc1~150^2~7^2~6 ("ARM: ftrace: enable
I took a look at what the remaining uses of the frame pointer
unwinder are, or if we could just use the Arm unwinder
everywhere. For OABI kernels, the frame pointer unwinder is
still required of course, but the Arm unwinder is already the
default for all CONFIG_AEABI kernels and required for
all v6/v7/v7m ones. Until two years ago with commit
41918ec82eb6 ("ARM: ftrace: enable the graph tracer with
the EABI unwinder"), the frame pointer unwinder was also
required for CONFIG_FUNCTION_GRAPH_TRACER, and that is
likely why you had that configuration, but we no longer
depend on it for anything else.
However, I came across this bit from arch/arm/include/asm/ftrace.h
that seems to be the only downside of CONFIG_ARM_UNWIND:
#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
/*
* return_address uses walk_stackframe to do it's work. If both
* CONFIG_FRAME_POINTER=y and CONFIG_ARM_UNWIND=y walk_stackframe uses unwind
* information. For this to work in the function tracer many functions would
* have to be marked with __notrace. So for now just depend on
* !CONFIG_ARM_UNWIND.
*/
void *return_address(unsigned int);
#else
static inline void *return_address(unsigned int level)
{
return NULL;
}
#endif
#define ftrace_return_address(n) return_address(n)
You added this in 4bf1fa5a34aa ("[ARM] 5613/1: implement
CALLER_ADDRESSx") 15 years ago, and it appears nobody ever
got around to finish the job for return_address() if I read
this correctly. Is this something we should finally add,
and then make the frame pointer unwinder specific to OABI
kernels?
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-27 9:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-25 7:59 FUNCTION_GRAPH_TRACER + UNWINDER_FRAME_POINTER broken on arm Uwe Kleine-König
2024-05-27 8:39 ` Linux regression tracking (Thorsten Leemhuis)
2024-05-27 8:42 ` Thorsten Leemhuis
2024-05-27 9:18 ` Arnd Bergmann [this message]
2024-05-27 12:25 ` Uwe Kleine-König
2024-05-27 13:33 ` Arnd Bergmann
2024-05-27 22:56 ` Steven Rostedt
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=36cd10de-c51c-40ff-90e8-71495406019d@app.fastmail.com \
--to=arnd@arndb.de \
--cc=ardb@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=rostedt@goodmis.org \
--cc=u.kleine-koenig@pengutronix.de \
/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