FUNCTION_GRAPH_TRACER + UNWINDER_FRAME_POINTER broken on arm

Steven Rostedt rostedt at goodmis.org
Mon May 27 15:56:27 PDT 2024


On Mon, 27 May 2024 14:25:52 +0200
Uwe Kleine-König <u.kleine-koenig at pengutronix.de> wrote:

> Completing it would mean adding the numerous __notrace annotions??

as long as it only affects arm.

Note, the history of HAVE_FUNCTION_GRAPH_FP_TEST is from gcc making a
copy of the stack frame, and when the function graph tracer went to
modify the return address, it only modified the copy (not the actual
return address) causing the shadow stack to become out of sync with the
real addresses and returning to the wrong address. This caused random
crashes. I added the FP_TEST to catch if this ever happens again.

See 71e308a239c09 ("function-graph: add stack frame test")

-- Steve



More information about the linux-arm-kernel mailing list