From: Josh Poimboeuf <jpoimboe@redhat.com>
To: David Laight <David.Laight@aculab.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: New objtool warning..
Date: Wed, 16 Dec 2020 10:58:55 -0600 [thread overview]
Message-ID: <20201216165855.7qrlt3eqszizmp4o@treble> (raw)
In-Reply-To: <6c4054c4fa3a4f6ab381411ffc9a8f01@AcuMS.aculab.com>
On Wed, Dec 16, 2020 at 10:46:31AM +0000, David Laight wrote:
> From: Josh Poimboeuf
> > Sent: 16 December 2020 04:49
> >
> > On Tue, Dec 15, 2020 at 08:22:23PM -0800, Linus Torvalds wrote:
> > > I only see this on my laptop, but that's probably because my desktop
> > > is built using clang. So it's a gcc code generation interaction, I
> > > suspect..
> > >
> > > Anyway, the new warning is
> > >
> > > drivers/gpu/drm/drm_edid.o: warning: objtool: do_cvt_mode() falls
> > > through to next function drm_mode_detailed.isra.0()
> > >
> > > and googling around a bit I see that 0day ended up reporting it on the
> > > linux-next lists, and blames commit 991fcb77f490 ("drm/edid: Fix
> > > uninitialized variable in drm_cvt_modes()").
> > >
> > > That presumably then makes gcc generate that odd code.
> > >
> > > That "unreachable()" is because the compiler isn't smart enough to see
> > > that yes, there really are case statements for every single possible
> > > case. Oh well. Maybe the code should just make one of the possible
> > > cases also be the "default:" case, and that might fix it.
> > >
> > > But maybe this is worth looking into for objtool too?
> > >
> > > Anyway, I see it with gcc-10.2.1 as per current F32. Holler if you
> > > can't reproduce it, I can send the object file around.
> >
> > I can't recreate with my compiler, but I think I've seen one like this
> > before. I suspect s/unreachable()/BUG()/ would fix it?
>
> Then a smart(er) compiler will report that the BUG() is unreachable.
It shouldn't, BUG() already has unreachable().
--
Josh
next prev parent reply other threads:[~2020-12-16 17:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 4:22 Linus Torvalds
2020-12-16 4:49 ` Josh Poimboeuf
2020-12-16 5:31 ` Linus Torvalds
2020-12-16 16:20 ` Josh Poimboeuf
2020-12-16 10:46 ` David Laight
2020-12-16 16:58 ` Josh Poimboeuf [this message]
[not found] ` <CAHk-=wjMoZesNgi1yWzY3nikyR11PUxHgov561UNom5mL1R4rA@mail.gmail.com>
[not found] ` <CAHk-=whpp_eo-5d0ZLpx=0X91J0ZNReZ_9riNf96z2dy24z=hw@mail.gmail.com>
2020-12-16 20:01 ` Josh Poimboeuf
2020-12-17 10:45 ` Peter Zijlstra
2020-12-17 16:25 ` Josh Poimboeuf
2020-12-17 17:27 ` Linus Torvalds
2020-12-17 17:45 ` Linus Torvalds
2020-12-17 18:25 ` Joe Perches
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=20201216165855.7qrlt3eqszizmp4o@treble \
--to=jpoimboe@redhat.com \
--cc=David.Laight@aculab.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®