[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160415134745.wxb73xemv2tqib5m@treble>
Date: Fri, 15 Apr 2016 08:47:45 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Denys Vlasenko <dvlasenk@...hat.com>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Thomas Graf <tgraf@...g.ch>,
Peter Zijlstra <peterz@...radead.org>,
David Rientjes <rientjes@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
linux-scsi <linux-scsi@...r.kernel.org>
Subject: Re: This patch triggers a bad gcc bug (was Re: [PATCH] force
inlining of some byteswap operations)
On Fri, Apr 15, 2016 at 07:45:19AM +0200, Ingo Molnar wrote:
>
> * Denys Vlasenko <dvlasenk@...hat.com> wrote:
>
> > > In fact, the following patch seems to fix it:
> > >
> > > diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
> > > index bf66ea6..56b9e81 100644
> > > --- a/include/scsi/scsi_transport_fc.h
> > > +++ b/include/scsi/scsi_transport_fc.h
> > > @@ -796,7 +796,7 @@ fc_remote_port_chkready(struct fc_rport *rport)
> > > return result;
> > > }
> > >
> > > -static inline u64 wwn_to_u64(u8 *wwn)
> > > +static __always_inline u64 wwn_to_u64(u8 *wwn)
> > > {
> > > return get_unaligned_be64(wwn);
> > > }
> >
> > It is not a guarantee.
>
> Of course it's a workaround - but is there any deterministic way to turn off this
> GCC bug (by activating some GCC command line switch), or do we have to live with
> objtool warning about this GCC?
I don't think we know yet if there's a reliable way to turn the bug off.
Also, according to the gcc guys, this bug won't always result in a
truncated function, and may sometimes just make some inline function
call sites disappear:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646#c14
though I haven't been able to confirm that experimentally. But if it's
true, that means that objtool won't be able to detect all cases of the
bug and some function calls may just silently disappear!
There's a lot of activity in the bug now, so hopefully they'll be able
to tell us soon if there's a reliable way to avoid it and/or detect it.
BTW, Denys posted a workaround patch for the qla2xxxx code:
https://lkml.kernel.org/r/1460716583-15673-1-git-send-email-dvlasenk@redhat.com
--
Josh
Powered by blists - more mailing lists