From: Linus Torvalds <torvalds@linux-foundation.org>
To: Greg KH <gregkh@suse.de>
Cc: Krzysztof Oledzki <olel@ans.pl>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
stable@kernel.org, lwn@lwn.net
Subject: Re: Linux 2.6.27.27
Date: Mon, 20 Jul 2009 09:01:18 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.01.0907200848530.13838@localhost.localdomain> (raw)
In-Reply-To: <20090720151008.GC10015@suse.de>
On Mon, 20 Jul 2009, Greg KH wrote:
>
> > >Linus Torvalds (1):
> > > Don't use '-fwrapv' compiler option: it's buggy in gcc-4.1.x
> >
> > I'm very sorry to say that but 2.6.27.27 compiled with gcc-4.2.4
> > hangs during boot and it is caused by this fix.
> >
> > I extended http://bugzilla.kernel.org/show_bug.cgi?id=13012 with
> > additional info & .config.
>
> Wierd. Linus, any thoughts? Do we need to check the version of the
> compiler that we are using before turning that option off?
Dang. That was what we hoped to avoid by not using -fwrapv - we didn't
know which compilers were buggy, although it _looked_ like just 4.1.x (I
have some dim memory of somebody suspecting a 4.2.x version too, but that
may have been just a "we know it should only be needed in 4.3.x, so maybe
we shouldn't use it in 4.2.x either").
But it looks like the "buggy window" for -fno-strict-overflow is
potentially even _larger_ than it ever was with -fwrapv. And I suspect
that in both cases the real problem is that almost nobody ever uses either
optimization flag, so coverage is way way smaller.
For now, I suspect we need to do something like this: go back to -fwrapv
(because it has gotten more testing), but limit it to 4.2.x and newer.
However, it would be really good to figure out _why_ it breaks. It's
probably some specific configuration issue in addition to the particular
kernel vesion (and maybe it even needs some particular hardware to show
the bug - ie a specific driver that triggers it or whatever).
Linus
---
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 79957b3..47a3a1a 100644
--- a/Makefile
+++ b/Makefile
@@ -566,7 +566,7 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
# disable invalid "can't wrap" optimizations for signed / pointers
-KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
+KBUILD_CFLAGS += $(call cc-ifversion, -ge, 0402, -fwrapv)
# revert to pre-gcc-4.4 behaviour of .eh_frame
KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
next prev parent reply other threads:[~2009-07-20 16:03 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 4:06 Greg KH
2009-07-20 4:07 ` Greg KH
2009-07-20 11:51 ` Krzysztof Oledzki
2009-07-20 15:10 ` Greg KH
2009-07-20 16:01 ` Linus Torvalds [this message]
2009-07-20 21:45 ` Krzysztof Oledzki
2009-07-20 22:08 ` Linus Torvalds
2009-07-20 23:47 ` Marc Dionne
2009-07-20 23:56 ` Linus Torvalds
2009-07-21 0:37 ` Marc Dionne
2009-07-21 1:01 ` Linus Torvalds
2009-07-21 6:40 ` Krzysztof Oledzki
2009-07-21 1:05 ` Linus Torvalds
2009-07-21 2:38 ` Marc Dionne
2009-07-21 6:33 ` Krzysztof Oledzki
2009-07-21 10:16 ` Krzysztof Oledzki
2009-07-21 16:11 ` Linus Torvalds
2009-07-21 19:15 ` Linus Torvalds
2009-07-21 21:34 ` Troy Moure
2009-07-22 0:53 ` Linus Torvalds
2009-07-22 1:07 ` Linus Torvalds
2009-07-22 6:16 ` Troy Moure
2009-07-22 15:58 ` Linus Torvalds
2009-07-22 1:16 ` Linus Torvalds
2009-07-22 8:12 ` Krzysztof Oledzki
2009-07-22 8:32 ` Krzysztof Oledzki
2009-07-22 9:55 ` Krzysztof Oledzki
2009-07-22 10:44 ` Krzysztof Oledzki
2009-07-22 9:58 ` Jens Rosenboom
2009-07-22 10:27 ` Troy Moure
2009-07-22 10:54 ` Krzysztof Oledzki
2009-07-22 10:24 ` Troy Moure
2009-07-22 10:33 ` Dick Streefland
2009-07-22 13:48 ` Krzysztof Oledzki
2009-07-22 15:48 ` Linus Torvalds
2009-07-29 14:57 ` Pavel Machek
2009-07-29 15:59 ` Linus Torvalds
2009-07-22 11:49 ` Krzysztof Oledzki
2009-07-22 13:27 ` Henrique de Moraes Holschuh
2009-07-22 13:45 ` Krzysztof Oledzki
2009-07-22 15:36 ` Ian Lance Taylor
2009-07-23 17:33 ` Krzysztof Olędzki
2009-07-24 21:13 ` Greg KH
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=alpine.LFD.2.01.0907200848530.13838@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lwn@lwn.net \
--cc=olel@ans.pl \
--cc=stable@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
Powered by JetHome