Re: [PATCH v2 11/12] retpoline/objtool: Disable some objtool warnings

From: Josh Poimboeuf
Date: Thu Jan 04 2018 - 11:33:03 EST


On Thu, Jan 04, 2018 at 08:13:08AM -0800, Andi Kleen wrote:
> On Thu, Jan 04, 2018 at 10:06:01AM -0600, Josh Poimboeuf wrote:
> > On Thu, Jan 04, 2018 at 07:59:14AM -0800, Andi Kleen wrote:
> > > > NAK. We can't blindly disable objtool warnings, that will break
> > > > livepatch and the ORC unwinder. If you share a .o file (or the GCC
> > > > code) I can look at adding retpoline support.
> > >
> > > I don't think we can wait for that. We can disable livepatch and the
> > > unwinder for now. They are not essential. Frame pointers should work
> > > well enough for unwinding
> >
> > If you want to make this feature conflict with livepatch and ORC,
> > silencing objtool warnings is not the way to do it.
>
> I don't see why it would conflict with the unwinder anyways?
>
> It doesn't change the long term stack state, so it should be invisible to the
> unwinder (unless you crash in the thunk, which is very unlikely)
>
> I actually got some unwinder backtraces during development and they seemed
> to work.

Those objtool warnings are places where ORC annotations are either
missing or wrong.

At the very least, this needs to conflict with HAVE_RELIABLE_STACKTRACE
and HAVE_STACK_VALIDATION until objtool can understand the new code.
Currently ORC relies on HAVE_STACK_VALIDATION, so CONFIG_UNWINDER_ORC
would need to be disabled as well.

> > > and afaik nobody can use livepatch in mainline anyways.
> >
> > Why not? The patch creation tooling is still out-of-tree, but livepatch
> > itself is fully supported in mainline.
>
> Ok.
>
> Still doesn't seem critical at this point if it's some out of tree
> thing.

There are many livepatch users out there who would disagree. The
out-of-tree bits aren't in kernel space. If your patches are ready
before objtool supports them, then fine, make them conflict with
objtool. But please don't introduce silent breakage.

Either way we'll need to figure out a way to get objtool support ASAP.

--
Josh