]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - kernel/trace/fgraph.c
tracing: Define MCOUNT_INSN_SIZE when not defined without direct calls
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 3 Jan 2020 02:56:44 +0000 (21:56 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 3 Jan 2020 02:56:44 +0000 (21:56 -0500)
commitd2ccbccb5444e9141b33cf5399927737e9ff1c3d
tree242acc9830ad7c3e2e1cc48ffdb3f2eca28b4665
parent02f4e01ce710fe20d2e5548d52bfdea52efd09d1
tracing: Define MCOUNT_INSN_SIZE when not defined without direct calls

In order to handle direct calls along side of function graph tracer, a check
is made to see if the address being traced by the function graph tracer is a
direct call or not. To get the address used by direct callers, the return
address is subtracted by MCOUNT_INSN_SIZE.

For some archs with certain configurations, MCOUNT_INSN_SIZE is undefined
here. But these should not be using direct calls anyway. Just define
MCOUNT_INSN_SIZE to zero in this case.

Link: https://lore.kernel.org/r/202001020219.zvE3vsty%lkp@intel.com
Reported-by: kbuild test robot <lkp@intel.com>
Fixes: ff205766dbbee ("ftrace: Fix function_graph tracer interaction with BPF trampoline")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/fgraph.c