lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Dec 2020 10:46:31 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Josh Poimboeuf' <jpoimboe@...hat.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>
CC:     Peter Zijlstra <peterz@...radead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: New objtool warning..

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.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists