linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Denys Vlasenko <dvlasenk@redhat.com>
Subject: Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings
Date: Wed, 1 Mar 2017 10:53:55 -0600	[thread overview]
Message-ID: <20170301165355.w2kmdmbql2f2ouzg@treble> (raw)
In-Reply-To: <CAK8P3a0BUDCUE7qT=tAh4U2LNOqHUBDadRJXsbJMT3cX3hnVnQ@mail.gmail.com>

On Wed, Mar 01, 2017 at 04:27:29PM +0100, Arnd Bergmann wrote:
> On Wed, Mar 1, 2017 at 3:40 PM, Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> > On Wed, Mar 01, 2017 at 10:45:03AM +0100, Arnd Bergmann wrote:
> 
> >> Actually, something must have changed in gcc since last month, I also
> >> just got a report in another file:
> >>
> >> drivers/i2c/busses/i2c-img-scb.o: warning: objtool: img_i2c_probe()
> >> falls through to next function img_i2c_read_fifo()
> >
> > This one looks like it could be related to some recent objtool changes
> > which affect how it interprets 'ud2'.  Which commit were you testing
> > with?  Can you provide the .config file, and the object file if it's not
> > too big?
> 
> This is with my randconfig test series on top of latest linux-next.
> I see it with the latest gcc-7.0.1 snapshot as well as an earlier gcc-7.0.0
> build (20161201), but not with gcc-6.3.1

I wonder if this is another gcc bug.  gcc inserted two ud2 instructions
in img_i2c_probe() for no apparent reason.  Here's one of them:

     5c3:       e8 00 00 00 00          callq  5c8 <img_i2c_probe+0x298>
                        5c4: R_X86_64_PC32      dev_warn-0x4
     5c8:       8b 05 00 00 00 00       mov    0x0(%rip),%eax        # 5ce <img_i2c_probe+0x29e>
                        5ca: R_X86_64_PC32      .data+0xec
     5ce:       89 83 70 06 00 00       mov    %eax,0x670(%rbx)
     5d4:       0f 0b                   ud2

Which corresponds to the following code block:

	if (i2c->bitrate > timings[ARRAY_SIZE(timings) - 1].max_bitrate) {
		dev_warn(i2c->adap.dev.parent,
			 "requested bitrate (%u) is higher than the max bitrate supported (%u)\n",
			 i2c->bitrate,
			 timings[ARRAY_SIZE(timings) - 1].max_bitrate);
		timing = timings[ARRAY_SIZE(timings) - 1];
		i2c->bitrate = timing.max_bitrate;
	}

I see no apparent reason for the ud2.

Can you rebuild the object with CONFIG_DEBUG_INFO and use addr2line to
see what code lines are associated with the ud2's?

-- 
Josh

  reply	other threads:[~2017-03-01 17:21 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 12:56 [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann
2016-10-10 20:23 ` Josh Poimboeuf
2016-10-11  8:08   ` Arnd Bergmann
2016-10-11 12:20     ` Josh Poimboeuf
2016-10-11 13:30       ` Arnd Bergmann
2016-10-11 15:05         ` Josh Poimboeuf
2016-10-11 15:51           ` Josh Poimboeuf
2016-10-11 20:38             ` Arnd Bergmann
2016-10-12 13:01               ` Josh Poimboeuf
2016-10-13 12:46               ` Another gcc corruption bug (was Re: [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings) Josh Poimboeuf
2016-10-13 17:57                 ` Denys Vlasenko
2016-10-13 20:15                   ` Josh Poimboeuf
2017-03-01  9:34               ` [PATCH] [RFC] x86: avoid -mtune=atom for objtool warnings Arnd Bergmann
2017-03-01  9:45                 ` Arnd Bergmann
2017-03-01 14:40                   ` Josh Poimboeuf
2017-03-01 15:27                     ` Arnd Bergmann
2017-03-01 16:53                       ` Josh Poimboeuf [this message]
2017-03-01 22:05                         ` Arnd Bergmann
2017-03-01 22:42                         ` Arnd Bergmann
2017-03-02  1:03                           ` Josh Poimboeuf
2017-03-02  6:31                             ` Ingo Molnar
2017-03-02 12:49                               ` Josh Poimboeuf
2017-03-02 13:46                                 ` Ingo Molnar
2017-03-02 14:08                                   ` Josh Poimboeuf
2017-03-02 14:46                                     ` Ingo Molnar
2017-03-02 22:49                             ` Arnd Bergmann
2017-03-02 23:05                               ` Josh Poimboeuf
2017-03-03  8:58                                 ` Arnd Bergmann
2017-03-03 11:27                                   ` Arnd Bergmann
2017-03-01 14:31                 ` Josh Poimboeuf
2017-03-01 15:21                   ` Arnd Bergmann
2017-03-02 18:25                     ` Josh Poimboeuf
2017-03-02 22:43                       ` Arnd Bergmann
2017-03-02 22:57                         ` [PATCH] objtool: fix another gcc jump table detection issue Josh Poimboeuf
2017-03-02 23:01                           ` Arnd Bergmann
2016-10-11  1:53 ` [PATCH] objtool: support '-mtune=atom' stack frame setup instruction Josh Poimboeuf

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=20170301165355.w2kmdmbql2f2ouzg@treble \
    --to=jpoimboe@redhat.com \
    --cc=arnd@arndb.de \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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).