[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220225192008.d7a4f2b5558fe43c95909777@kernel.org>
Date: Fri, 25 Feb 2022 19:20:08 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
joao@...rdrivepizza.com, hjl.tools@...il.com, jpoimboe@...hat.com,
andrew.cooper3@...rix.com, linux-kernel@...r.kernel.org,
ndesaulniers@...gle.com, keescook@...omium.org,
samitolvanen@...gle.com, mark.rutland@....com,
alyssa.milburn@...el.com, mbenes@...e.cz,
alexei.starovoitov@...il.com
Subject: Re: [PATCH v2 12/39] x86/ibt,ftrace: Search for __fentry__ location
On Thu, 24 Feb 2022 21:19:19 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Fri, 25 Feb 2022 10:34:49 +0900
> Masami Hiramatsu <mhiramat@...nel.org> wrote:
>
> > > > > + if (!rec) {
> > > > > + if (!kallsyms_lookup_size_offset(ip, &size, &offset))
> > > > > + goto out;
> > > > > +
> > > > > + if (!offset)
> > > >
> > > > Isn't this 'if (offset)' ?
> > >
> > > No, the point to only look for the fentry location if the ip passed in
> > > points to the start of the function. IOW, +0 offset.
> >
> > OK, so this means ftrace_location() will be same as
> > ftrace_location_range(sym, sym_end) ?
>
> No. It only acts like ftrace_location_range(sym, sym_end) if the passed
> in argument is the ip of the function (kallsyms returns offset = 0)
Got it. So now ftrace_location() will return the ftrace address
when the ip == func or ip == mcount-call.
Thank you,
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists