lkml.org 
[lkml]   [2020]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 5/6] x86/ftrace: Use text_poke()
On Tue, 21 Jan 2020, Josh Poimboeuf wrote:

> On Tue, Jan 21, 2020 at 09:35:28AM +0100, Miroslav Benes wrote:
> > On Mon, 20 Jan 2020, Josh Poimboeuf wrote:
> >
> > > On Mon, Oct 21, 2019 at 10:05:49AM -0500, Josh Poimboeuf wrote:
> > > > On Wed, Oct 16, 2019 at 09:42:17AM +0200, Peter Zijlstra wrote:
> > > > > > which are not compatible with livepatching. GCC upstream now has
> > > > > > -flive-patching option, which disables all those interfering optimizations.
> > > > >
> > > > > Which, IIRC, has a significant performance impact and should thus really
> > > > > not be used...
> > > > >
> > > > > If distros ship that crap, I'm going to laugh at them the next time they
> > > > > want a single digit performance improvement because *important*.
> > > >
> > > > I have a crazy plan to try to use objtool to detect function changes at
> > > > a binary level, which would hopefully allow us to drop this flag.
> > > >
> > > > But regardless, I wonder if we enabled this flag prematurely. We still
> > > > don't have a reasonable way to use it for creating source-based live
> > > > patches upstream, and it should really be optional for CONFIG_LIVEPATCH,
> > > > since kpatch-build doesn't need it.
> > >
> > > I also just discovered that -flive-patching is responsible for all those
> > > "unreachable instruction" objtool warnings which Randy has been
> > > dutifully bugging me about over the last several months. For some
> > > reason it subtly breaks GCC implicit noreturn detection for local
> > > functions.
> >
> > Ugh, that is unfortunate. Have you reported it?
>
> Not yet (but I plan to).

My findings so far...

I bisected through GCC options which -flive-patching disables and
-fno-ipa-pure-const is the culprit. I got no warnings without the option
with my config.

Then I found out allmodconfig was ok even with -flive-patching.
CONFIG_GCOV is the difference. CONFIG_GCOV=y seems to make the warnings go
away here.

/me goes staring

\
 
 \ /
  Last update: 2020-01-22 13:16    [W:0.505 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site