From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: New objtool warning..
Date: Tue, 15 Dec 2020 22:49:18 -0600 [thread overview]
Message-ID: <20201216044918.jdmi32dz75uboybv@treble> (raw)
In-Reply-To: <CAHk-=wiXtdHJBXw+=0so3ZV8mvG0xEykxUta2sUWPB=hUWHmtQ@mail.gmail.com>
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?
But yeah, it _might_ be possible to make objtool a little smarter here.
Gimme the .o file and I can take a look tomorrow.
--
Josh
next prev parent reply other threads:[~2020-12-16 4:51 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 [this message]
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
[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=20201216044918.jdmi32dz75uboybv@treble \
--to=jpoimboe@redhat.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®