[RFC PATCH -next v2 0/4] arm64/ftrace: support dynamic trampoline
Steven Rostedt
rostedt at goodmis.org
Thu Apr 21 05:37:58 PDT 2022
On Thu, 21 Apr 2022 09:13:01 +0800
"Wangshaobo (bobo)" <bobo.shaobowang at huawei.com> wrote:
> Not yet, Steve, ftrace_location() looks has no help to find a right
> rec->ip in our case,
>
> ftrace_location() can find a right rec->ip when input ip is in the range
> between
>
> sym+0 and sym+$end, but our question is how to identify rec->ip from
> __mcount_loc,
Are you saying that the "ftrace location" is not between sym+0 and sym+$end?
>
> this changed the patchable entry before bti to after in gcc:
>
> [1] https://reviews.llvm.org/D73680
>
> gcc tells the place of first nop of the 5 NOPs when using
> -fpatchable-function-entry=5,3,
>
> but not tells the first nop after bti, so we don't know how to adjust
> our rec->ip for ftrace.
OK, so I do not understand how the compiler is injecting bti with mcount
calls, so I'll just walk away for now ;-)
-- Steve
More information about the linux-arm-kernel
mailing list