lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ftrace bug
On Mon, 7 Mar 2022 13:00:05 +0100
Arend van Spriel <arend.vanspriel@broadcom.com> wrote:

> On 3/7/2022 12:26 PM, Arend van Spriel wrote:
> > Hi Steven,
> >
> > I wanted to use FTRACE on an ARM platform and I hit the following
> > warning which results in ftrace bug. This happens upon loading a module.
> > Looking up the warning I suspect the branch target is too far off. The
> > module is quite large and therefor not loaded in the modules section. Is
> > there a way to exclude a module. In ftrace_module_init I see a check for
> > !mod->num_ftrace_callsites. Is there a way to avoid creating ftrace
> > callsites in a module?
>
> Could it be accomplished by this?
>
> CFLAGS_REMOVE_lockdep.o = $(CC_FLAGS_FTRACE)
>

You mean with something other than "lockdep.o".

You can do that to remove all ftrace callers from the .o file.

You could add the problem functions with "notrace" (which you should be
able to see what functions those were from the ftrace_bug output after the
"cut here").

You could keep an entire directory from having ftrace to it with:

ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE)

in the make file for that directory, and it will remove it totally.

But this should be considered a work around, by removing this, you lose all
the functionality you get with ftrace (tracing, ebpf attachments, and live
patching).

-- Steve

\
 
 \ /
  Last update: 2022-03-07 14:29    [W:0.050 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site