Re: objtool warnings for kernel/trace/trace_selftest_dynamic.o

From: Andi Kleen
Date: Mon Dec 17 2018 - 19:01:34 EST

On Mon, Dec 17, 2018 at 11:35:24PM +0100, Peter Zijlstra wrote:
> On Mon, Dec 17, 2018 at 12:55:35PM -0800, Andi Kleen wrote:
> > On Mon, Dec 17, 2018 at 08:29:38PM +0100, Peter Zijlstra wrote:
> > > When/if we get the LTO trainwreck sorted -- which very much includes
> > > getting that memory-order-consume fixed -- we can revisit all that.
> >
> > What do you mean? I'm not aware of any LTO problems with memory-order-consume?
> The compiler is basically allowed to break RCU (and anything else that
> depends on read-read dependencies). LTO makes it _far_ more likely this
> happens.
> We need guarantees (and possible switches) from the compiler folks that
> this will not happen before I'll retract my NAK from any LTO enabling.

Are you really saying that the current RCU code depends on cross file inlining
not happening?

If that is true it's quite bad. Of course it would be a untolerable
situation because all kinds of changes can break it, and there would
be likely already plenty of broken code in tree.

I have a hard time believing it though. Do you have a concrete
example or is this just FUD?

BTW I have a user base for LTO and so far noone has reported any issues
like this.