From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Borislav Petkov <bp@suse.de>, Dave Hansen <dave.hansen@intel.com>,
x86-ml <x86@kernel.org>, lkml <linux-kernel@vger.kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
live-patching@vger.kernel.org
Subject: Re: [GIT PULL] x86/urgent for v5.11-rc7
Date: Mon, 8 Feb 2021 16:47:05 +0100 [thread overview]
Message-ID: <YCFc+ewvwNWqrbY7@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210208153300.m5skwcxxrdpo37iz@treble>
On Mon, Feb 08, 2021 at 09:33:00AM -0600, Josh Poimboeuf wrote:
> On Mon, Feb 08, 2021 at 10:02:06AM -0500, Steven Rostedt wrote:
> > On Sun, 7 Feb 2021 16:45:40 -0600
> > Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> >
> > > > I do suspect involved people should start thinking about how they want
> > > > to deal with functions starting with
> > > >
> > > > endbr64
> > > > call __fentry__
> > > >
> > > > instead of the call being at the very top of the function.
> > >
> > > FWIW, objtool's already fine with it (otherwise we would have discovered
> > > the need to disable fcf-protection much sooner).
> >
> > And this doesn't really affect tracing (note, another user that might be
> > affected is live kernel patching).
>
> Good point, livepatch is indeed affected. Is there a better way to get
> the "call __fentry__" address for a given function?
>
>
> /*
> * Convert a function address into the appropriate ftrace location.
> *
> * Usually this is just the address of the function, but on some architectures
> * it's more complicated so allow them to provide a custom behaviour.
> */
> #ifndef klp_get_ftrace_location
> static unsigned long klp_get_ftrace_location(unsigned long faddr)
> {
> return faddr;
> }
> #endif
I suppose the trivial fix is to see if it points to endbr64 and if so,
increment the addr by the length of that.
next prev parent reply other threads:[~2021-02-08 15:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210207104022.GA32127@zn.tnic>
[not found] ` <CAHk-=widXSyJ8W3vRrqO-zNP12A+odxg2J2_-oOUskz33wtfqA@mail.gmail.com>
[not found] ` <20210207175814.GF32127@zn.tnic>
[not found] ` <CAHk-=wi5z9S7x94SKYNj6qSHBqz+OD76GW=MDzo-KN2Fzm-V4Q@mail.gmail.com>
[not found] ` <20210207224540.ercf5657pftibyaw@treble>
[not found] ` <20210208100206.3b74891e@gandalf.local.home>
2021-02-08 15:33 ` [GIT PULL] x86/urgent for v5.11-rc7 Josh Poimboeuf
2021-02-08 15:47 ` Peter Zijlstra [this message]
2021-02-08 16:15 ` Steven Rostedt
2021-02-09 8:32 ` Miroslav Benes
2021-02-09 14:49 ` Steven Rostedt
2021-02-09 15:16 ` Miroslav Benes
2021-02-09 16:45 ` Alexei Starovoitov
2021-02-09 16:55 ` Andy Lutomirski
2021-02-09 18:09 ` Linus Torvalds
2021-02-09 18:26 ` Andy Lutomirski
2021-02-09 18:39 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YCFc+ewvwNWqrbY7@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ast@kernel.org \
--cc=bp@suse.de \
--cc=dave.hansen@intel.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).